Skip to content

Commit 8cc1aee

Browse files
committed
Fix detection of (nested) placeholder types
1 parent 8068f13 commit 8cc1aee

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mypy/semanal.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5046,8 +5046,7 @@ def analyze_value_types(self, items: list[Expression]) -> list[Type]:
50465046
analyzed = PlaceholderType(None, [], node.line)
50475047

50485048
# has_no_typevars does not work with PlaceholderType.
5049-
typ = get_proper_type(analyzed)
5050-
if not isinstance(typ, PlaceholderType) and not has_no_typevars(typ):
5049+
if not has_placeholder(analyzed) and not has_no_typevars(analyzed):
50515050
self.fail(
50525051
"TypeVar constraint type cannot be parametrized by type variables", node
50535052
)

0 commit comments

Comments
 (0)