Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent crash on generic NamedTuple with unresolved typevar bound #18585

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions mypy/semanal_shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,9 @@ class HasPlaceholders(BoolTypeQuery):
def __init__(self) -> None:
super().__init__(ANY_STRATEGY)

def visit_tuple_type(self, t: TupleType, /) -> bool:
return super().visit_tuple_type(t) or t.partial_fallback.accept(self)

def visit_placeholder_type(self, t: PlaceholderType) -> bool:
return True

Expand Down