Skip to content

Commit

Permalink
Fix detection of (nested) placeholder types
Browse files Browse the repository at this point in the history
  • Loading branch information
brianschubert committed Nov 25, 2024
1 parent 8068f13 commit 8cc1aee
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mypy/semanal.py
Original file line number Diff line number Diff line change
Expand Up @@ -5046,8 +5046,7 @@ def analyze_value_types(self, items: list[Expression]) -> list[Type]:
analyzed = PlaceholderType(None, [], node.line)

# has_no_typevars does not work with PlaceholderType.
typ = get_proper_type(analyzed)
if not isinstance(typ, PlaceholderType) and not has_no_typevars(typ):
if not has_placeholder(analyzed) and not has_no_typevars(analyzed):
self.fail(
"TypeVar constraint type cannot be parametrized by type variables", node
)
Expand Down

0 comments on commit 8cc1aee

Please sign in to comment.