Skip to content

Commit ca6f8a5

Browse files
committed
SQ -> Fix recognition of several typing special forms, including: Optional, Union, Callable
1 parent 820d58f commit ca6f8a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypy/semanal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7845,7 +7845,7 @@ def try_parse_as_type_expression(self, maybe_type_expr: Expression) -> None:
78457845
if isinstance(maybe_type_expr.base, NameExpr):
78467846
if isinstance(
78477847
maybe_type_expr.base.node, Var
7848-
) and not self.var_is_typing_special_form(maybe_type_expr.base):
7848+
) and not self.var_is_typing_special_form(maybe_type_expr.base.node):
78497849
# Leftmost part of IndexExpr refers to a Var. Not a valid type.
78507850
maybe_type_expr.as_type = None
78517851
return

0 commit comments

Comments
 (0)