diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2018-12-04 08:33:21 +0100 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2018-12-04 08:33:21 +0100 |
commit | d03cd2225c7c9d7cea3b441942555749c64f449b (patch) | |
tree | 7d4cdb3400408e4ee171795ddf26f634ea551318 | |
parent | 9ea356a3639aea0c9951a85c988d720dde613e25 (diff) | |
download | astroid-git-d03cd2225c7c9d7cea3b441942555749c64f449b.tar.gz |
Fix a bug where an Attribute used as a base class was triggering a crash
Close #626
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | astroid/bases.py | 2 |
2 files changed, 6 insertions, 0 deletions
@@ -6,6 +6,10 @@ What's New in astroid 2.2.0? ============================ Release Date: TBA +* Fix a bug where an Attribute used as a base class was triggering a crash + + Close #626 + * Added special support for `enum.IntFlag` Close PyCQA/pylint#2534 diff --git a/astroid/bases.py b/astroid/bases.py index 318ddb5d..8fbbebf2 100644 --- a/astroid/bases.py +++ b/astroid/bases.py @@ -82,6 +82,8 @@ def _is_property(meth): continue if inferred.__class__.__name__ == "ClassDef": for base_class in inferred.bases: + if base_class.__class__.__name__ != "Name": + continue module, _ = base_class.lookup(base_class.name) if module.name == BUILTINS and base_class.name == "property": return True |