Skip to content

Commit fcd7d96

Browse files
committed
_get_visible_type_name also checks in EXCLUDED_IMPORTS
This allows old names to be automatically translated to new names in the stub files. For example, this allows the actual module to write `typing.Callable` and have it turn into `collections.abc.Callable`
1 parent 0b34566 commit fcd7d96

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/reflex-base/src/reflex_base/utils/pyi_generator.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,7 @@ def _get_visible_type_name(
633633
if type_name is not None and (
634634
type_hint_globals.get(type_name) is typ
635635
or type_name in DEFAULT_IMPORTS.get(str(type_module), set())
636+
or type_name in EXCLUDED_IMPORTS.get(str(type_module), set())
636637
):
637638
return type_name
638639

0 commit comments

Comments
 (0)