MCPcopy Index your code
hub / github.com/reactive-python/reactpy / custom_vdom_constructor

Function custom_vdom_constructor

src/py/reactpy/reactpy/core/vdom.py:247–257  ·  view source on GitHub ↗

Cast function to VdomDictConstructor

(func: _CustomVdomDictConstructor)

Source from the content-addressed store, hash-verified

245
246
247def custom_vdom_constructor(func: _CustomVdomDictConstructor) -> VdomDictConstructor:
248 """Cast function to VdomDictConstructor"""
249
250 @wraps(func)
251 def wrapper(*attributes_and_children: Any) -> VdomDict:
252 attributes, children = separate_attributes_and_children(attributes_and_children)
253 key = attributes.pop("key", None)
254 attributes, event_handlers = separate_attributes_and_event_handlers(attributes)
255 return func(attributes, children, key, event_handlers)
256
257 return cast(VdomDictConstructor, wrapper)
258
259
260def separate_attributes_and_children(

Callers 1

html.pyFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected