File tree Expand file tree Collapse file tree
packages/reflex-core/src/reflex_core Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2812,13 +2812,22 @@ def wrapper(
28122812 run_script = staticmethod (run_script )
28132813 __file__ = __file__
28142814
2815+ @property
2816+ def BaseState (self ) -> "type[BaseState]" : # noqa: N802
2817+ """Get the BaseState class.
2818+
2819+ A reference to BaseState is needed for doc generation when resolving
2820+ type hints, so add it to the namespace late to avoid circular import
2821+ issues.
2822+
2823+ Returns:
2824+ The BaseState class.
2825+ """
2826+ from reflex .state import BaseState
2827+
2828+ return BaseState
2829+
28152830
28162831event = EventNamespace
28172832event .event = event # pyright: ignore[reportAttributeAccessIssue]
28182833sys .modules [__name__ ] = event # pyright: ignore[reportArgumentType]
2819-
2820- # A reference to BaseState is needed for doc generation when resolving type
2821- # hints, so add it to the namespace late to avoid circular import issues.
2822- from reflex .state import BaseState # noqa: E402
2823-
2824- event .BaseState = BaseState # pyright: ignore[reportAttributeAccessIssue]
You can’t perform that action at this time.
0 commit comments