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 1221422 commit 0c0d582Copy full SHA for 0c0d582
1 file changed
mypy/expandtype.py
@@ -541,6 +541,7 @@ def visit_tuple_type(self, t: TupleType) -> Type:
541
if isinstance(item, UnpackType):
542
unpacked = get_proper_type(item.type)
543
if isinstance(unpacked, Instance):
544
+ # expand_type() may be called during semantic analysis, before invalid unpacks are fixed.
545
if unpacked.type.fullname != "builtins.tuple":
546
return t.partial_fallback.accept(self)
547
if t.partial_fallback.type.fullname != "builtins.tuple":
0 commit comments