The only difference in those two classes are that one of them declares an explicit None return annotation. Environment Mypy version used: 0.950 and 0.960 Mypy command-line flags: None Mypy ...
from typing import Union def f(x : Union[int, float]): if isinstance(x, float): print("b", x) elif isinstance(x, int): print("a", x) with --warn-unreachable returns ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results