diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2016-11-01 12:52:11 +0200 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2016-11-01 14:21:46 +0200 |
commit | 1b34d34e87a014d1ad96263169b25ecf34e900cb (patch) | |
tree | 791f4c989558254905a444b3dab3bf57cd70a65e /astroid/bases.py | |
parent | b82db73ca429ee5d4ce030ab44bbd9a01204c7f2 (diff) | |
download | astroid-git-1b34d34e87a014d1ad96263169b25ecf34e900cb.tar.gz |
Correct the generator comprehension to return Instances only when the element is not Uninferable.
Diffstat (limited to 'astroid/bases.py')
-rw-r--r-- | astroid/bases.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/astroid/bases.py b/astroid/bases.py index 3b23edc3..4fc79598 100644 --- a/astroid/bases.py +++ b/astroid/bases.py @@ -305,7 +305,7 @@ class UnboundMethod(Proxy): if (self._proxied.name == '__new__' and self._proxied.parent.frame().qname() == '%s.object' % BUILTINS): infer = caller.args[0].infer() if caller.args else [] - return ((x is util.Uninferable and x or Instance(x)) for x in infer) + return (Instance(x) if x is not util.Uninferable else x for x in infer) return self._proxied.infer_call_result(caller, context) def bool_value(self): |