summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorflorentx <florent.xicluna@gmail.com>2009-10-28 08:55:16 +0100
committerflorentx <florent.xicluna@gmail.com>2009-10-28 08:55:16 +0100
commit5eab29efefb204b1babd8c0040fa6523170368bb (patch)
tree4bcec731ce614a2b76ca3b8f56d63a86e8c95aaf
parent438297954981615c61828523ec07456525e0e460 (diff)
downloadpep8-5eab29efefb204b1babd8c0040fa6523170368bb.tar.gz
Make the check W603 compliant with Python3.
-rwxr-xr-xpep8.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pep8.py b/pep8.py
index 5853983..a136f86 100755
--- a/pep8.py
+++ b/pep8.py
@@ -650,9 +650,9 @@ def python_3000_not_equal(logical_line, tokens):
backwards compatibility only. New code should always use !=.
The older syntax is removed in Python 3000.
"""
- for token in tokens:
- if token[0] == tokenize.OP and token[1] == '<>':
- return token[2], "W603 '<>' is deprecated, use '!='"
+ pos = logical_line.find('<>')
+ if pos > -1:
+ return pos, "W603 '<>' is deprecated, use '!='"
##############################################################################