summaryrefslogtreecommitdiff
path: root/astroid/tree/scoped_nodes.py
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2016-11-21 10:45:14 +0200
committerClaudiu Popa <pcmanticore@gmail.com>2016-11-21 10:46:18 +0200
commit8aa364e8a672bf596f0b3bb62a6b72c72e188dbc (patch)
treec0eabcbd3660681d9e9a50d9e6b95fafe10229a7 /astroid/tree/scoped_nodes.py
parent7557f8f3af764d58a8fcdeecb248190b79a508cc (diff)
downloadastroid-git-8aa364e8a672bf596f0b3bb62a6b72c72e188dbc.tar.gz
Skip the current class when deducing its mro. Close #361.
Diffstat (limited to 'astroid/tree/scoped_nodes.py')
-rw-r--r--astroid/tree/scoped_nodes.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/astroid/tree/scoped_nodes.py b/astroid/tree/scoped_nodes.py
index 79da1d4d..e9c6a26d 100644
--- a/astroid/tree/scoped_nodes.py
+++ b/astroid/tree/scoped_nodes.py
@@ -1925,6 +1925,8 @@ class ClassDef(QualifiedNameMixin, base.FilterStmtsMixin,
bases = list(self._inferred_bases(context=context))
bases_mro = []
for base in bases:
+ if base is self:
+ continue
try:
mro = base.mro(context=context)
bases_mro.append(mro)