Is your feature request related to a problem? Please describe.
Currently, membership checks that resolve to Never don't produce a warning, but this is almost always a mistake. An example is:
a: set[int] = {1, 2, 3}
b: set[str] = {"a", "b", "c"}
for item in a:
if item in b:
print(item) # type here is Never
Describe the solution you'd like
This membership check will resolve to Never (always False), it'd be nice if there was an optional configuration to make this a warning diagnostic, similar to reportUnnecessaryComparison.
Is your feature request related to a problem? Please describe.
Currently, membership checks that resolve to Never don't produce a warning, but this is almost always a mistake. An example is:
Describe the solution you'd like
This membership check will resolve to Never (always False), it'd be nice if there was an optional configuration to make this a warning diagnostic, similar to reportUnnecessaryComparison.