Skip to content

Commit c386609

Browse files
committed
Fixed operator check for E711/E712 (Ref #307)
1 parent 36389f0 commit c386609

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pep8.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@ def comparison_to_singleton(logical_line, noqa):
947947
COMPARE_SINGLETON_REVERSE_REGEX.search(logical_line))
948948
if match:
949949
singleton = match.group('singleton')
950-
same = match.group('op')
950+
same = (match.group('op') == '==')
951951

952952
msg = "'if cond is %s:'" % (('' if same else 'not ') + singleton)
953953
if singleton in ('None',):

0 commit comments

Comments
 (0)