diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2016-01-15 16:00:29 +0200 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2016-01-15 16:00:42 +0200 |
commit | 00340232d1947c4cf770d9f484b010f349cd385a (patch) | |
tree | 05e33966636a026b09716f3a27122d5b7f955a0c | |
parent | 3fa9ba5655c88c988ef73830a5c570c16b49a274 (diff) | |
download | pylint-git-00340232d1947c4cf770d9f484b010f349cd385a.tar.gz |
Mark missing messages with check_messages.
-rw-r--r-- | pylint/checkers/base.py | 2 | ||||
-rw-r--r-- | pylint/checkers/classes.py | 5 | ||||
-rw-r--r-- | pylint/checkers/exceptions.py | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/pylint/checkers/base.py b/pylint/checkers/base.py index 63da0c92a..174642f50 100644 --- a/pylint/checkers/base.py +++ b/pylint/checkers/base.py @@ -1794,7 +1794,7 @@ class ElifChecker(BaseTokenChecker): def visit_comprehension(self, node): self._if_counter += len(node.ifs) - @check_messages('too-many-nested-blocks') + @check_messages('too-many-nested-blocks', 'simplifiable-if-statement') def visit_if(self, node): self._check_simplifiable_if(node) self._check_nested_blocks(node) diff --git a/pylint/checkers/classes.py b/pylint/checkers/classes.py index a7f25adba..4b66b109e 100644 --- a/pylint/checkers/classes.py +++ b/pylint/checkers/classes.py @@ -348,6 +348,9 @@ a metaclass class method.'} self._first_attrs = [] self._meth_could_be_func = None + @check_messages('no-init', 'invalid-slots', 'inherit-non-class', + 'inconsistent-mro', 'duplicate-bases', + 'invalid-slots', 'invalid-slots-object') def visit_classdef(self, node): """init visit variable _accessed """ @@ -363,7 +366,6 @@ a metaclass class method.'} self._check_proper_bases(node) self._check_consistent_mro(node) - @check_messages('inconsistent-mro', 'duplicate-bases') def _check_consistent_mro(self, node): """Detect that a class has a consistent mro or duplicate bases.""" try: @@ -376,7 +378,6 @@ a metaclass class method.'} # Old style class, there's no mro so don't do anything. pass - @check_messages('inherit-non-class') def _check_proper_bases(self, node): """ Detect that a class inherits something which is not diff --git a/pylint/checkers/exceptions.py b/pylint/checkers/exceptions.py index 4cf562923..e60f69b9e 100644 --- a/pylint/checkers/exceptions.py +++ b/pylint/checkers/exceptions.py @@ -307,7 +307,7 @@ class ExceptionsChecker(BaseChecker): @check_messages('bare-except', 'broad-except', 'binary-op-exception', 'bad-except-order', - 'catching-non-exception') + 'catching-non-exception', 'duplicate-except') def visit_tryexcept(self, node): """check for empty except""" exceptions_classes = [] |