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 8f67a54 commit 8bf049fCopy full SHA for 8bf049f
1 file changed
mypy/checker.py
@@ -8685,7 +8685,7 @@ def flatten_types_if_tuple(t: Type) -> list[Type]:
8685
"""Flatten a nested sequence of tuples into one list of nodes."""
8686
t = get_proper_type(t)
8687
if isinstance(t, UnionType):
8688
- return [b for a in t.items for b in flatten_types(a)]
+ return [b for a in t.items for b in flatten_types_if_tuple(a)]
8689
if isinstance(t, TupleType):
8690
return [b for a in t.items for b in flatten_types_if_tuple(a)]
8691
elif is_named_instance(t, "builtins.tuple"):
0 commit comments