Skip to content

Commit 8068f13

Browse files
committed
Fix skipped get_proper_type
1 parent a945fe6 commit 8068f13

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

mypy/semanal.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5046,9 +5046,8 @@ 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-
if not isinstance(
5050-
get_proper_type(analyzed), PlaceholderType
5051-
) and not has_no_typevars(analyzed):
5049+
typ = get_proper_type(analyzed)
5050+
if not isinstance(typ, PlaceholderType) and not has_no_typevars(typ):
50525051
self.fail(
50535052
"TypeVar constraint type cannot be parametrized by type variables", node
50545053
)

0 commit comments

Comments
 (0)