File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ Bug fixes:
36
36
37
37
* Don't crash if os.path.expanduser() throws an ImportError. (Issue #297)
38
38
39
- * Fix false positive E711/E712. (Issue #336)
39
+ * Fix false positive E711/E712/E713 . (Issues #330 and #336)
40
40
41
41
42
42
1.5.7 (2014-05-29)
Original file line number Diff line number Diff line change 108
108
WHITESPACE_AFTER_COMMA_REGEX = re .compile (r'[,;:]\s*(?: |\t)' )
109
109
COMPARE_SINGLETON_REGEX = re .compile (r'\b(None|False|True)?\s*([=!]=)'
110
110
r'\s*(?(1)|(None|False|True))\b' )
111
- COMPARE_NEGATIVE_REGEX = re .compile (r'\b(not)\s+[^[( { ]+\s+(in|is)\s' )
111
+ COMPARE_NEGATIVE_REGEX = re .compile (r'\b(not)\s+[^][)(} { ]+\s+(in|is)\s' )
112
112
COMPARE_TYPE_REGEX = re .compile (r'(?:[=!]=|is(?:\s+not)?)\s*type(?:s.\w+Type'
113
113
r'|\s*\(\s*([^)]*[^ )])\s*\))' )
114
114
KEYWORD_REGEX = re .compile (r'(\s*)\b(?:%s)\b(\s*)' % r'|' .join (KEYWORDS ))
Original file line number Diff line number Diff line change 46
46
#: E714
47
47
if not X .B is Y :
48
48
pass
49
+
50
+ #
49
51
#: Okay
50
52
if x not in y :
51
53
pass
54
+
52
55
if not (X in Y or X is Z ):
53
56
pass
57
+
54
58
if not (X in Y ):
55
59
pass
60
+
56
61
if x is not y :
57
62
pass
58
63
59
64
if TrueElement .get_element (True ) == TrueElement .get_element (False ):
60
65
pass
66
+
61
67
if (True ) == TrueElement or x == TrueElement :
62
68
pass
69
+
70
+ assert (not foo ) in bar
71
+ assert {'x' : not foo } in bar
72
+ assert [42 , not foo ] in bar
63
73
#:
You can’t perform that action at this time.
0 commit comments