File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -151,9 +151,17 @@ def from_brand(cls, brand: Brand):
151151
152152 if brand .defaults :
153153 if brand .defaults and "bootstrap" in brand .defaults :
154- defaults .update (brand .defaults ["bootstrap" ])
154+ if isinstance (brand .defaults ["bootstrap" ], dict ):
155+ brand_defaults_bs : dict [str , str ] = brand .defaults ["bootstrap" ]
156+ defaults .update (brand_defaults_bs )
155157 if "shiny" in brand .defaults and "theme" in brand .defaults ["shiny" ]:
156- defaults .update (brand .defaults ["shiny" ]["theme" ])
158+ if isinstance (brand .defaults ["shiny" ]["theme" ], dict ):
159+ # TODO: Use brand.defaults.shiny.theme.defaults instead
160+ # TODO: Validate that it's really a dict[str, scalar]
161+ brand_shiny_theme : dict [str , str ] = brand .defaults ["shiny" ]["theme" ]
162+ defaults .update (brand_shiny_theme )
163+
164+ # TODO: Get functions, mixins, rules as well
157165
158166 return cls (** defaults )
159167
You can’t perform that action at this time.
0 commit comments