From ab63c978ac3540cd556f880d6035264deea8cb6e Mon Sep 17 00:00:00 2001 From: Florent Xicluna Date: Tue, 16 Dec 2014 01:05:48 +0100 Subject: Fix false positive E711/E712; issue #336 --- testsuite/E71.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'testsuite') diff --git a/testsuite/E71.py b/testsuite/E71.py index 3f07b1a..25a308f 100644 --- a/testsuite/E71.py +++ b/testsuite/E71.py @@ -55,4 +55,9 @@ if not (X in Y): pass if x is not y: pass + +if TrueElement.get_element(True) == TrueElement.get_element(False): + pass +if (True) == TrueElement or x == TrueElement: + pass #: -- cgit v1.2.1 From 6a2f71b19fb107983af6bb321fa6cb3b78650f4a Mon Sep 17 00:00:00 2001 From: Florent Xicluna Date: Tue, 16 Dec 2014 14:51:52 +0100 Subject: Fix false positive E713; issue #330 --- testsuite/E71.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'testsuite') diff --git a/testsuite/E71.py b/testsuite/E71.py index 25a308f..ea870e5 100644 --- a/testsuite/E71.py +++ b/testsuite/E71.py @@ -46,18 +46,28 @@ if not X is Y: #: E714 if not X.B is Y: pass + +# #: Okay if x not in y: pass + if not (X in Y or X is Z): pass + if not (X in Y): pass + if x is not y: pass if TrueElement.get_element(True) == TrueElement.get_element(False): pass + if (True) == TrueElement or x == TrueElement: pass + +assert (not foo) in bar +assert {'x': not foo} in bar +assert [42, not foo] in bar #: -- cgit v1.2.1