diff options
author | Torsten Marek <tmarek@google.com> | 2013-06-19 14:34:47 +0200 |
---|---|---|
committer | Torsten Marek <tmarek@google.com> | 2013-06-19 14:34:47 +0200 |
commit | 2ceab9e47e77ffd2cf5284877abcbb9d66048b9e (patch) | |
tree | 65f39310a7d6cc1ad30a88df37b075348c22eb6f /utils.py | |
parent | 8e98049bd624c91c80ec1cf2e85ab7c60144ce8e (diff) | |
download | pylint-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.py | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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: |