summaryrefslogtreecommitdiff
path: root/utils.py
diff options
context:
space:
mode:
authorEmile Anclin <emile.anclin@logilab.fr>2010-11-15 14:52:57 +0100
committerEmile Anclin <emile.anclin@logilab.fr>2010-11-15 14:52:57 +0100
commitee9367d5716ab89888b89c45383ebc26b44ee86a (patch)
tree7adfd4a7b83db568742a9d26bf261d74a39ff5f1 /utils.py
parent3c8ccc78ec536fca1c64a9fed36c3445b1e7d1eb (diff)
downloadpylint-ee9367d5716ab89888b89c45383ebc26b44ee86a.tar.gz
223 : run python2.x compatible fixers
Diffstat (limited to 'utils.py')
-rw-r--r--utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils.py b/utils.py
index 541014f..7b7eb2a 100644
--- a/utils.py
+++ b/utils.py
@@ -127,7 +127,7 @@ class MessagesHandlerMixIn:
chkid = None
for msgid, (msg, msgdescr) in msgs_dict.items():
# avoid duplicate / malformed ids
- assert not self._messages.has_key(msgid), \
+ assert msgid not in self._messages, \
'Message id %r is already defined' % msgid
assert chkid is None or chkid == msgid[1:3], \
'Inconsistent checker part in message id %r' % msgid
@@ -416,7 +416,7 @@ class ReportsHandlerMixIn:
for key, value in kwargs.items():
if key[-1] == '_':
key = key[:-1]
- assert not self.stats.has_key(key)
+ assert key not in self.stats
self.stats[key] = value
return self.stats