diff options
author | florentx <florent.xicluna@gmail.com> | 2009-10-28 08:55:16 +0100 |
---|---|---|
committer | florentx <florent.xicluna@gmail.com> | 2009-10-28 08:55:16 +0100 |
commit | 5eab29efefb204b1babd8c0040fa6523170368bb (patch) | |
tree | 4bcec731ce614a2b76ca3b8f56d63a86e8c95aaf | |
parent | 438297954981615c61828523ec07456525e0e460 (diff) | |
download | pep8-5eab29efefb204b1babd8c0040fa6523170368bb.tar.gz |
Make the check W603 compliant with Python3.
-rwxr-xr-x | pep8.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 '!='" ############################################################################## |