diff options
author | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2010-07-05 08:10:40 +0200 |
---|---|---|
committer | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2010-07-05 08:10:40 +0200 |
commit | 97a1dcea92a20cbf9f80069f81e73fe043d08516 (patch) | |
tree | a71f0bddce012417008942ec8bfdb0a3e365e1f7 /scoped_nodes.py | |
parent | c85af9cce2a3115da3dfaa45d61e3be2d1f51ab4 (diff) | |
download | astroid-git-97a1dcea92a20cbf9f80069f81e73fe043d08516.tar.gz |
fix Class.interfaces so that no InferenceError raised on empty __implements__
--HG--
branch : stable
Diffstat (limited to 'scoped_nodes.py')
-rw-r--r-- | scoped_nodes.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scoped_nodes.py b/scoped_nodes.py index d6595b28..b53ec4e5 100644 --- a/scoped_nodes.py +++ b/scoped_nodes.py @@ -927,13 +927,15 @@ class Class(StmtMixIn, LocalsDictNodeNG, FilterStmtsMixin): if not herited and not implements.frame() is self: return found = set() + missing = False for iface in unpack_infer(implements): if iface is YES: + missing = True continue if not iface in found and handler_func(iface): found.add(iface) yield iface - if not found: + if missing: raise InferenceError() |