Skip to content

Commit 3c3b461

Browse files
committed
pyi_generator: remove get_type_hints, wasn't doing the right thing
1 parent befa874 commit 3c3b461

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

reflex/utils/pyi_generator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from multiprocessing import Pool, cpu_count
2020
from pathlib import Path
2121
from types import ModuleType, SimpleNamespace, UnionType
22-
from typing import Any, get_args, get_origin, get_type_hints
22+
from typing import Any, get_args, get_origin
2323

2424
from reflex.components.component import Component
2525
from reflex.utils import types as rx_types
@@ -368,7 +368,7 @@ def _extract_class_props_as_ast_nodes(
368368
event_triggers = target_class.get_event_triggers()
369369
# Import from the target class to ensure type hints are resolvable.
370370
exec(f"from {target_class.__module__} import *", type_hint_globals)
371-
for name, value in get_type_hints(target_class).items():
371+
for name, value in target_class.__annotations__.items():
372372
if (
373373
name in spec.kwonlyargs
374374
or name in EXCLUDED_PROPS

0 commit comments

Comments
 (0)