File tree 2 files changed +19
-1
lines changed
2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 108
108
DOCSTRING_REGEX = re .compile (r'u?r?["\']' )
109
109
EXTRANEOUS_WHITESPACE_REGEX = re .compile (r'[[({] | []}),;:]' )
110
110
WHITESPACE_AFTER_COMMA_REGEX = re .compile (r'[,;:]\s*(?: |\t)' )
111
- COMPARE_SINGLETON_REGEX = re .compile (r'\b(None|False|True )?\s*([=!]=)'
111
+ COMPARE_SINGLETON_REGEX = re .compile (r'(\bNone|\bFalse|\bTrue )?\s*([=!]=)'
112
112
r'\s*(?(1)|(None|False|True))\b' )
113
113
COMPARE_NEGATIVE_REGEX = re .compile (r'\b(not)\s+[^][)(}{ ]+\s+(in|is)\s' )
114
114
COMPARE_TYPE_REGEX = re .compile (r'(?:[=!]=|is(?:\s+not)?)\s*type(?:s.\w+Type'
Original file line number Diff line number Diff line change 10
10
#: E711
11
11
if None != res :
12
12
pass
13
+ #: E711
14
+ if res [1 ] == None :
15
+ pass
16
+ #: E711
17
+ if res [1 ] != None :
18
+ pass
19
+ #: E711
20
+ if None != res [1 ]:
21
+ pass
22
+ #: E711
23
+ if None == res [1 ]:
24
+ pass
13
25
14
26
#
15
27
#: E712
24
36
#: E712
25
37
if False == res :
26
38
pass
39
+ #: E712
40
+ if res [1 ] == True :
41
+ pass
42
+ #: E712
43
+ if res [1 ] != False :
44
+ pass
27
45
28
46
#
29
47
#: E713
You can’t perform that action at this time.
0 commit comments