Fails to detect `E713 test for membership should be 'not in'` when left side more complex than simple variable
Kache opened this issue · comments
Kevin C commented
var = {'foo': 3}
if not var in [1, 2, 3]: # detected
pass
# all the below are not detected
if not var['foo'] in [1, 2, 3]:
pass
if not str(var) in [1, 2, 3]:
pass
if not var.keys() in [1, 2, 3]:
pass
edit
sorry, dupe of #334
Anthony Sottile commented
please search the issue tracker next time. I've put in a bunch of work to make it easy to search by code