diff options
author | Dmitry Pribysh <dmand@yandex.ru> | 2015-10-18 16:43:53 +0300 |
---|---|---|
committer | Dmitry Pribysh <dmand@yandex.ru> | 2015-10-18 16:43:53 +0300 |
commit | 3df1fb9ee598eec589c988b7790cf44b031341f2 (patch) | |
tree | d813e4ee6d6b875581cb913e3a893b6756668784 | |
parent | e19536a645f93b7a02173c4166b928c185a02aa4 (diff) | |
download | pylint-fix-667.tar.gz |
Rename checking function for 'super()' call checking and update Changelog.fix-667
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | pylint/checkers/classes.py | 4 |
2 files changed, 6 insertions, 2 deletions
@@ -2,6 +2,10 @@ ChangeLog for Pylint -------------------- -- + * Make 'no-self-use' checker not emit a warning if there is a 'super()' + call inside the method. + Closes issue #667. + * Add checker to identify multiple imports on one line. Closes issue #598. diff --git a/pylint/checkers/classes.py b/pylint/checkers/classes.py index c628e94..c39b971 100644 --- a/pylint/checkers/classes.py +++ b/pylint/checkers/classes.py @@ -140,7 +140,7 @@ def _is_attribute_property(name, klass): return True return False -def _has_super_call(fundef_node): +def _has_bare_super_call(fundef_node): for call in fundef_node.nodes_of_class(astroid.Call): func = call.func if (isinstance(func, astroid.Name) and @@ -554,7 +554,7 @@ a metaclass class method.'} and not (node.is_abstract() or overrides_a_method(class_node, node.name) or decorated_with_property(node) or - (six.PY3 and _has_super_call(node)))): + (six.PY3 and _has_bare_super_call(node)))): self.add_message('no-self-use', node=node) def visit_attribute(self, node): |