We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6694e3 commit 6671a37Copy full SHA for 6671a37
src/typing_extensions.py
@@ -4264,10 +4264,9 @@ def evaluate_forward_ref(
4264
# and some users rely on it.
4265
"_AnnotatedAlias",
4266
]
4267
-for _name in _typing_names:
4268
- if hasattr(typing, _name):
4269
- globals()[_name] = getattr(typing, _name)
4270
-del _name
+globals().update(
+ {name: getattr(typing, name) for name in _typing_names if hasattr(typing, name)}
+)
4271
# These are defined unconditionally because they are used in
4272
# typing-extensions itself.
4273
Generic = typing.Generic
0 commit comments