File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -317,7 +317,7 @@ def visit_none_type(self, t: NoneType) -> ProperType:
317317 if state .strict_optional :
318318 if isinstance (self .s , (NoneType , UninhabitedType )):
319319 return t
320- elif isinstance (self .s , UnboundType ):
320+ elif isinstance (self .s , ( UnboundType , AnyType ) ):
321321 return AnyType (TypeOfAny .special_form )
322322 else :
323323 return mypy .typeops .make_simplified_union ([self .s , t ])
Original file line number Diff line number Diff line change @@ -691,7 +691,7 @@ def __init__(self, s: ProperType) -> None:
691691 def visit_unbound_type (self , t : UnboundType ) -> ProperType :
692692 if isinstance (self .s , NoneType ):
693693 if state .strict_optional :
694- return AnyType ( TypeOfAny . special_form )
694+ return UninhabitedType ( )
695695 else :
696696 return self .s
697697 elif isinstance (self .s , UninhabitedType ):
You can’t perform that action at this time.
0 commit comments