Skip to content

Commit be5e608

Browse files
committed
Perf improvement
1 parent 4d0bd6b commit be5e608

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mypy/subtypes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2142,15 +2142,15 @@ def is_erased_instance(t: Instance) -> bool:
21422142
"""Is this an instance where all args are Any types?"""
21432143
if not t.args:
21442144
return False
2145-
for arg in map(get_proper_type, t.args):
2145+
for arg in t.args:
21462146
if isinstance(arg, UnpackType):
21472147
unpacked = get_proper_type(arg.type)
21482148
if not isinstance(unpacked, Instance):
21492149
return False
21502150
assert unpacked.type.fullname == "builtins.tuple"
21512151
if not isinstance(get_proper_type(unpacked.args[0]), AnyType):
21522152
return False
2153-
elif not isinstance(arg, AnyType):
2153+
elif not isinstance(get_proper_type(arg), AnyType):
21542154
return False
21552155
else:
21562156
return True

0 commit comments

Comments
 (0)