summaryrefslogtreecommitdiff
path: root/pep8.py
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2014-03-24 21:53:02 +0100
committerFlorent Xicluna <florent.xicluna@gmail.com>2014-03-24 21:53:02 +0100
commitbc112091ee1f171496cb1d5c181547544970f352 (patch)
treea1669cfa23872ae64fed652624110ca03c1442c3 /pep8.py
parentdfdc5c01ea22e514414e54cf87a05fcffcb1a467 (diff)
downloadpep8-bc112091ee1f171496cb1d5c181547544970f352.tar.gz
Minor change in previous patch
Diffstat (limited to 'pep8.py')
-rwxr-xr-xpep8.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/pep8.py b/pep8.py
index b0c9cce..b825068 100755
--- a/pep8.py
+++ b/pep8.py
@@ -967,10 +967,8 @@ def python_3000_has_key(logical_line, noqa):
Okay: if "alph" in d:\n print d["alph"]
W601: assert d.has_key('alph')
"""
- if noqa:
- return
pos = logical_line.find('.has_key(')
- if pos > -1:
+ if pos > -1 and not noqa:
yield pos, "W601 .has_key() is deprecated, use 'in'"