pyqt_reactive.forms.widget_creation_registry

Shared annotation helpers for widget creation strategies.

Functions

enum_member_type(param_type)

Return the enum member from a union annotation, if one is present.

get_enum_from_list(param_type)

Extract enum type from List[Enum].

is_enum(param_type)

Check if type is an Enum.

is_list_of_enums(param_type)

Check if type is List[Enum].

is_union_type(param_type)

Check whether a type annotation is a typing or PEP 604 union.

resolve_optional(param_type)

Resolve Optional[T] to T.

pyqt_reactive.forms.widget_creation_registry.is_union_type(param_type: Type) bool[source]

Check whether a type annotation is a typing or PEP 604 union.

pyqt_reactive.forms.widget_creation_registry.resolve_optional(param_type: Type) Type[source]

Resolve Optional[T] to T.

pyqt_reactive.forms.widget_creation_registry.is_enum(param_type: Type) bool[source]

Check if type is an Enum.

pyqt_reactive.forms.widget_creation_registry.enum_member_type(param_type: Type) Type | None[source]

Return the enum member from a union annotation, if one is present.

pyqt_reactive.forms.widget_creation_registry.is_list_of_enums(param_type: Type) bool[source]

Check if type is List[Enum].

pyqt_reactive.forms.widget_creation_registry.get_enum_from_list(param_type: Type) Type[source]

Extract enum type from List[Enum].