Skip to content

Commit 3e197a0

Browse files
committed
Temp fix
1 parent d5f6642 commit 3e197a0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

mypy/typeanal.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1717,9 +1717,10 @@ def fix_instance(
17171717
env[tv.id] = arg
17181718
t.args = tuple(args)
17191719
fix_type_var_tuple_argument(t)
1720-
fixed = expand_type(t, env)
1721-
assert isinstance(fixed, Instance)
1722-
t.args = fixed.args
1720+
if not t.type.has_type_var_tuple_type:
1721+
fixed = expand_type(t, env)
1722+
assert isinstance(fixed, Instance)
1723+
t.args = fixed.args
17231724

17241725
min_tv_count = sum(tv.has_default() is False for tv in t.type.defn.type_vars)
17251726
if arg_count != 0 and not (min_tv_count <= arg_count <= max_tv_count):

0 commit comments

Comments
 (0)