summaryrefslogtreecommitdiff
path: root/astroid/scoped_nodes.py
diff options
context:
space:
mode:
authorCeridwen <ceridwenv@gmail.com>2015-08-21 12:30:06 -0400
committerCeridwen <ceridwenv@gmail.com>2015-08-21 12:30:06 -0400
commitcac27b433c9342a1f978278a165864f7e3f1f546 (patch)
tree459587853d073a9e33796a3b444a667934007b10 /astroid/scoped_nodes.py
parentd59fbbd2b15169d59714564935252cea7b57ec7c (diff)
downloadastroid-cac27b433c9342a1f978278a165864f7e3f1f546.tar.gz
Add tests for aliases
Diffstat (limited to 'astroid/scoped_nodes.py')
-rw-r--r--astroid/scoped_nodes.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/astroid/scoped_nodes.py b/astroid/scoped_nodes.py
index 7a312bb..4e2c31f 100644
--- a/astroid/scoped_nodes.py
+++ b/astroid/scoped_nodes.py
@@ -1342,14 +1342,16 @@ class ClassDef(bases.Statement, LocalsDictNodeNG, mixins.FilterStmtsMixin):
"""Get an attribute from this class, using Python's attribute semantic
This method doesn't look in the instance_attrs dictionary
- since it's done by an Instance proxy at inference time.
- It may return a YES object if the attribute has not been actually
+ since it's done by an Instance proxy at inference time. It
+ may return a YES object if the attribute has not been actually
found but a __getattr__ or __getattribute__ method is defined.
- If *class_context* is given, then it's considered that the attribute
- is accessed from a class context, e.g. Class.attribute, otherwise
- it might have been accessed from an instance as well.
- If *class_context* is used in that case, then a lookup in the
- implicit metaclass and the explicit metaclass will be done.
+ If *class_context* is given, then it's considered that the
+ attribute is accessed from a class context,
+ e.g. ClassDef.attribute, otherwise it might have been accessed
+ from an instance as well. If *class_context* is used in that
+ case, then a lookup in the implicit metaclass and the explicit
+ metaclass will be done.
+
"""
values = self.locals.get(name, [])
if name in self.special_attributes:
@@ -1395,7 +1397,7 @@ class ClassDef(bases.Statement, LocalsDictNodeNG, mixins.FilterStmtsMixin):
return
for attr in bases._infer_stmts(attrs, context, frame=cls):
- if not isinstance(attr, Function):
+ if not isinstance(attr, FunctionDef):
yield attr
continue