Open
Description
A user reported code which basically boils down to this:
class A:
a: Optional[int]
b: Optional[int]
...
def f(self) -> None:
if None in (self.a, self.b):
return
print(self.a + self.b) # ok at runtime but mypy error currently
Mypy doesn't recognize the None in (...)
test as a legitimate None test.
The code seems a little unusual but if we see this frequently enough it might be worth supporting at some point.