-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
Description
The following assertion generates an error when using --strict-equality, but perhaps it should be allowed, since an assertion can test something that should be impossible?
from typing import List
def f(x: List[int]) -> None:
assert 'foo' not in x # Error, but should this be okay?
...I saw a few examples similar to the above in production code and had to use # type: ignore[...] with them, which didn't feel optimal.
@ilevkivskyi What do you think?
Reactions are currently unavailable