Skip to content

Commit fc2ab45

Browse files
committed
Prevent crash on generic NamedTuple with unresolved typevar bound
1 parent f44a60d commit fc2ab45

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mypy/semanal_shared.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,9 @@ class HasPlaceholders(BoolTypeQuery):
364364
def __init__(self) -> None:
365365
super().__init__(ANY_STRATEGY)
366366

367+
def visit_tuple_type(self, t: TupleType, /) -> bool:
368+
return super().visit_tuple_type(t) or t.partial_fallback.accept(self)
369+
367370
def visit_placeholder_type(self, t: PlaceholderType) -> bool:
368371
return True
369372

0 commit comments

Comments
 (0)