MCPcopy
hub / github.com/reflex-dev/reflex / __init__

Method __init__

packages/reflex-base/src/reflex_base/style.py:247–262  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 2

convertFunction · 0.85
updateMethod · 0.45

Tested by

no test coverage detected