diff options
author | Laura M?dioni <laura.medioni@logilab.fr> | 2015-10-29 09:37:06 +0100 |
---|---|---|
committer | Laura M?dioni <laura.medioni@logilab.fr> | 2015-10-29 09:37:06 +0100 |
commit | cb68a81eee457947b9750013c90bcfeb4eb22bcf (patch) | |
tree | 8b8cf0396b17cdadb2a3a73f72425f6c9e498c6a /pylint/test/functional/unneeded_not.py | |
parent | f17f2d9546c42bbf53bb75a77734df33d0c2e182 (diff) | |
download | pylint-cb68a81eee457947b9750013c90bcfeb4eb22bcf.tar.gz |
Fix crash with 'in' operator on unneeded-not
Diffstat (limited to 'pylint/test/functional/unneeded_not.py')
-rw-r--r-- | pylint/test/functional/unneeded_not.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pylint/test/functional/unneeded_not.py b/pylint/test/functional/unneeded_not.py index 882a238..78bf87c 100644 --- a/pylint/test/functional/unneeded_not.py +++ b/pylint/test/functional/unneeded_not.py @@ -1,6 +1,6 @@ """Check exceeding negations in boolean expressions trigger warnings""" -# pylint: disable=singleton-comparison +# pylint: disable=singleton-comparison, too-many-branches def unneeded_not(): """This is not ok @@ -31,6 +31,8 @@ def unneeded_not(): pass if not True == True: # [unneeded-not] pass + if not 2 in [3, 4]: # [unneeded-not] + pass def not_checked(): @@ -39,3 +41,5 @@ def not_checked(): someint = 2 if not(bool_var == False and someint == 1): pass + if 2 not in [3, 4]: + pass |