basedmypy
basedmypy copied to clipboard
Warn when a falsey boolean context is ambigious with `None`
a: bool | None
if not a: # error: the type of 'a' contains "None" and could be a mistake to check it in a boolean context
...
Not just bools, but anything that could be false.