summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelen ST <helenst@gmail.com>2014-12-11 21:30:45 +0000
committerHelen ST <helenst@gmail.com>2014-12-11 21:30:45 +0000
commitc3866095dc5252c80bdb4095d52a891ff76f7626 (patch)
tree86dce7b4a5a5361455e60153208fcfb57052d1c5
parent36389f0337ce25b399a25757fa757b1cd8f8a336 (diff)
downloadpep8-c3866095dc5252c80bdb4095d52a891ff76f7626.tar.gz
Fixed operator check for E711/E712 (Ref #307)
-rwxr-xr-xpep8.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pep8.py b/pep8.py
index 20356b9..dc6a801 100755
--- a/pep8.py
+++ b/pep8.py
@@ -947,7 +947,7 @@ def comparison_to_singleton(logical_line, noqa):
COMPARE_SINGLETON_REVERSE_REGEX.search(logical_line))
if match:
singleton = match.group('singleton')
- same = match.group('op')
+ same = (match.group('op') == '==')
msg = "'if cond is %s:'" % (('' if same else 'not ') + singleton)
if singleton in ('None',):