diff options
author | Torsten Marek <shlomme@gmail.com> | 2014-07-25 12:09:59 +0200 |
---|---|---|
committer | Torsten Marek <shlomme@gmail.com> | 2014-07-25 12:09:59 +0200 |
commit | 2c75198fb217d7ada8516b578ddbb897e86625af (patch) | |
tree | 99232c406998dc7667cb476eff72553327be1593 /scoped_nodes.py | |
parent | c9b5a95fa26bc5b83b7688d666d4de32cf1bd867 (diff) | |
download | astroid-git-2c75198fb217d7ada8516b578ddbb897e86625af.tar.gz |
Return YES if the bases cannot be inferred for a metaclass invocation, until we have an unknown AST node.
Diffstat (limited to 'scoped_nodes.py')
-rw-r--r-- | scoped_nodes.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scoped_nodes.py b/scoped_nodes.py index 502ebd5d..9ec9a91a 100644 --- a/scoped_nodes.py +++ b/scoped_nodes.py @@ -921,7 +921,11 @@ class Class(Statement, LocalsDictNodeNG, FilterStmtsMixin): if isinstance(bases, (Tuple, List)): result.bases = bases.itered() else: - result.bases = [YES] + # There is currently no AST node that can represent an 'unknown' + # node (YES is not an AST node), therefore we simply return YES here + # although we know at least the name of the class. + yield YES + return result.parent = caller.parent yield result else: |