Skip to content

Commit 59f8e25

Browse files
committed
Include fallback in building constraints for tuple types
1 parent 8ed16d1 commit 59f8e25

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

mypy/constraints.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,6 +1335,11 @@ def visit_tuple_type(self, template: TupleType) -> list[Constraint]:
13351335
res.extend(
13361336
infer_constraints(template_items[i], actual_items[i], self.direction)
13371337
)
1338+
res.extend(
1339+
infer_constraints(
1340+
template.partial_fallback, actual.partial_fallback, self.direction
1341+
)
1342+
)
13381343
return res
13391344
elif isinstance(actual, AnyType):
13401345
return self.infer_against_any(template.items, actual)

0 commit comments

Comments
 (0)