diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2015-09-22 15:18:49 +0000 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2015-09-22 15:18:49 +0000 |
commit | 5dca8e2a591baa0de387fb148046ddd887e2abb2 (patch) | |
tree | 7c19de6332653480afa2e038dc57544f8481e535 /astroid/scoped_nodes.py | |
parent | accff12b2d28a3f87d2dc4f5373fb8e1e5de3408 (diff) | |
download | astroid-git-5dca8e2a591baa0de387fb148046ddd887e2abb2.tar.gz |
Allow only classes to be looked up in the metaclass chain for searching for an attribute.
Diffstat (limited to 'astroid/scoped_nodes.py')
-rw-r--r-- | astroid/scoped_nodes.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/astroid/scoped_nodes.py b/astroid/scoped_nodes.py index acdd06a5..6e1f4bc9 100644 --- a/astroid/scoped_nodes.py +++ b/astroid/scoped_nodes.py @@ -1384,7 +1384,7 @@ class ClassDef(mixins.FilterStmtsMixin, LocalsDictNodeNG, bases.Statement): implicit_meta = self.implicit_metaclass() metaclass = self.metaclass() for cls in {implicit_meta, metaclass}: - if cls and cls != self: + if cls and cls != self and isinstance(cls, ClassDef): cls_attributes = self._get_attribute_from_metaclass( cls, name, context) attrs.update(set(cls_attributes)) |