summaryrefslogtreecommitdiff
path: root/utils.py
diff options
context:
space:
mode:
authorTorsten Marek <tmarek@google.com>2013-06-19 14:34:47 +0200
committerTorsten Marek <tmarek@google.com>2013-06-19 14:34:47 +0200
commit2ceab9e47e77ffd2cf5284877abcbb9d66048b9e (patch)
tree65f39310a7d6cc1ad30a88df37b075348c22eb6f /utils.py
parent8e98049bd624c91c80ec1cf2e85ab7c60144ce8e (diff)
downloadpylint-2ceab9e47e77ffd2cf5284877abcbb9d66048b9e.tar.gz
Also use the proper way of checking for enabled messages for leave_* methods.
Diffstat (limited to 'utils.py')
-rw-r--r--utils.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/utils.py b/utils.py
index d9e53d9..3507b70 100644
--- a/utils.py
+++ b/utils.py
@@ -624,11 +624,9 @@ class PyLintASTWalker(object):
elif member.startswith('leave_'):
l_meth = getattr(checker, member)
# don't use leave_methods with no activated message:
- if hasattr(l_meth, 'checks_msgs'):
- if not any(msgs.get(m, True) for m in l_meth.checks_msgs):
- continue
- leaves.setdefault(cid, []).append(l_meth)
- lcids.add(cid)
+ if self._is_method_enabled(l_meth):
+ leaves.setdefault(cid, []).append(l_meth)
+ lcids.add(cid)
visit_default = getattr(checker, 'visit_default', None)
if visit_default:
for cls in nodes.ALL_NODE_CLASSES: