MCPcopy Create free account
hub / github.com/dot-agent/nextpy / get_component_props

Method get_component_props

nextpy/frontend/components/component.py:531–542  ·  view source on GitHub ↗

Get the props that expected a component as value. Returns: The components props.

(cls)

Source from the content-addressed store, hash-verified

529 @classmethod
530 @lru_cache(maxsize=None)
531 def get_component_props(cls) -> set[str]:
532 """Get the props that expected a component as value.
533
534 Returns:
535 The components props.
536 """
537 return {
538 name
539 for name, field in cls.get_fields().items()
540 if name in cls.get_props()
541 and types._issubclass(field.outer_type_, Component)
542 }
543
544 @classmethod
545 def create(cls, *children, **props) -> Component:

Callers 2

get_dynamic_importsMethod · 0.95
_get_props_importsMethod · 0.95

Calls 3

itemsMethod · 0.80
get_fieldsMethod · 0.80
get_propsMethod · 0.45

Tested by

no test coverage detected