We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
reflex.state
1 parent 1cc2431 commit 3c8da1bCopy full SHA for 3c8da1b
2 files changed
packages/reflex-base/src/reflex_base/components/component.py
@@ -3019,7 +3019,3 @@ def create(
3019
),
3020
_var_value=value,
3021
)
3022
-
3023
3024
-# Late import of reflex.state to resolve ForwardRef type hints without circular import.
3025
-import reflex.state # noqa: E402
packages/reflex-base/src/reflex_base/utils/pyi_generator.py
@@ -572,6 +572,8 @@ def _extract_class_props_as_ast_nodes(
572
**type_hint_globals,
573
**_get_class_annotation_globals(target_class),
574
}
575
+ # State attr isn't really a prop and cannot be resolved, so pop it off.
576
+ target_class.__annotations__.pop("State", None)
577
type_hints = typing.get_type_hints(target_class, globalns=annotation_globals)
578
for name, value in reversed(type_hints.items()):
579
if (
0 commit comments