Skip to content

Commit c314806

Browse files
committed
refactor(BrandBootstrapConfig): Make static methods
1 parent 721b1be commit c314806

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

shiny/ui/_theme_brand.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ def from_brand(cls, brand: Brand):
228228

229229
defaults: dict[str, YamlScalarType] = {}
230230

231-
d_bootstrap = cls._brand_defaults_bootstrap(brand)
232-
d_shiny = cls._brand_defaults_shiny(brand)
231+
d_bootstrap = BrandBootstrapConfig._brand_defaults_bootstrap(brand)
232+
d_shiny = BrandBootstrapConfig._brand_defaults_shiny(brand)
233233

234234
defaults.update(d_bootstrap.defaults or {})
235235
defaults.update(d_shiny.defaults or {})
@@ -243,8 +243,8 @@ def from_brand(cls, brand: Brand):
243243
rules=d_shiny.rules,
244244
)
245245

246-
@classmethod
247-
def _brand_defaults_shiny(cls, brand: Brand) -> BrandBootstrapConfigFromYaml:
246+
@staticmethod
247+
def _brand_defaults_shiny(brand: Brand) -> BrandBootstrapConfigFromYaml:
248248
if (
249249
not brand.defaults
250250
or not isinstance(brand.defaults.get("shiny"), dict)
@@ -257,8 +257,8 @@ def _brand_defaults_shiny(cls, brand: Brand) -> BrandBootstrapConfigFromYaml:
257257
**brand.defaults["shiny"]["theme"],
258258
)
259259

260-
@classmethod
261-
def _brand_defaults_bootstrap(cls, brand: Brand) -> BrandBootstrapConfigFromYaml:
260+
@staticmethod
261+
def _brand_defaults_bootstrap(brand: Brand) -> BrandBootstrapConfigFromYaml:
262262
if not brand.defaults or not isinstance(brand.defaults.get("bootstrap"), dict):
263263
return BrandBootstrapConfigFromYaml(path="defaults.bootstrap")
264264

0 commit comments

Comments
 (0)