I was surprised that Mypy didn't flag an issue where I was calling max with an int and a None, which throws a TypeError at runtime.
For example, in the following code, should I not expect Mypy to warn that top is potentially None, which wouldn't work with max ?
fromtypingimportOptionaltop: Optional[int] =Noneprint(max(5, top))
I was surprised that Mypy didn't flag an issue where I was calling
maxwith an int and a None, which throws a TypeError at runtime.For example, in the following code, should I not expect Mypy to warn that
topis potentially None, which wouldn't work withmax?