Skip to content

Commit 6671a37

Browse files
Update src/typing_extensions.py
Co-authored-by: Alex Waygood <[email protected]>
1 parent d6694e3 commit 6671a37

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/typing_extensions.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4264,10 +4264,9 @@ def evaluate_forward_ref(
42644264
# and some users rely on it.
42654265
"_AnnotatedAlias",
42664266
]
4267-
for _name in _typing_names:
4268-
if hasattr(typing, _name):
4269-
globals()[_name] = getattr(typing, _name)
4270-
del _name
4267+
globals().update(
4268+
{name: getattr(typing, name) for name in _typing_names if hasattr(typing, name)}
4269+
)
42714270
# These are defined unconditionally because they are used in
42724271
# typing-extensions itself.
42734272
Generic = typing.Generic

0 commit comments

Comments
 (0)