summaryrefslogtreecommitdiff
path: root/pylint/checkers/utils.py
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2015-09-30 15:48:22 +0300
committerClaudiu Popa <pcmanticore@gmail.com>2015-09-30 15:48:22 +0300
commit6354d5ab66c119ed05ec3faa71c27a520b862e3d (patch)
treece06d717ea6a6d8029c43c652624d0ff61dda2b8 /pylint/checkers/utils.py
parentfd17d09f94aa286139723de9f86b5d04e7acf858 (diff)
downloadpylint-6354d5ab66c119ed05ec3faa71c27a520b862e3d.tar.gz
Don't consider a class abstract if its members can't be properly inferred.
This fixes a false positive related to abstract-class-instantiated. Closes issue #648.
Diffstat (limited to 'pylint/checkers/utils.py')
-rw-r--r--pylint/checkers/utils.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pylint/checkers/utils.py b/pylint/checkers/utils.py
index 767bba8..dda5f44 100644
--- a/pylint/checkers/utils.py
+++ b/pylint/checkers/utils.py
@@ -524,6 +524,12 @@ def unimplemented_abstract_methods(node, is_abstract_cb=None):
if isinstance(obj, astroid.AssignName):
infered = safe_infer(obj)
if not infered:
+ # Might be an abstract function,
+ # but since we don't have enough information
+ # in order to take this decision, we're taking
+ # the *safe* decision instead.
+ if obj.name in visited:
+ del visited[obj.name]
continue
if not isinstance(infered, astroid.FunctionDef):
if obj.name in visited: