Initialize the style. Args: style_dict: The style dictionary. kwargs: Other key value pairs to apply to the dict update.
(self, style_dict: dict[str, Any] | None = None, **kwargs)
| 245 | """A style dictionary.""" |
| 246 | |
| 247 | def __init__(self, style_dict: dict[str, Any] | None = None, **kwargs): |
| 248 | """Initialize the style. |
| 249 | |
| 250 | Args: |
| 251 | style_dict: The style dictionary. |
| 252 | kwargs: Other key value pairs to apply to the dict update. |
| 253 | """ |
| 254 | if style_dict: |
| 255 | style_dict.update(kwargs) |
| 256 | else: |
| 257 | style_dict = kwargs |
| 258 | if style_dict: |
| 259 | style_dict, self._var_data = convert(style_dict) |
| 260 | else: |
| 261 | self._var_data = EMPTY_VAR_DATA |
| 262 | super().__init__(style_dict) |
| 263 | |
| 264 | def update(self, style_dict: dict | None, **kwargs): |
| 265 | """Update the style. |