diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2018-03-05 11:30:44 +0100 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2018-03-05 11:30:44 +0100 |
commit | 2c1e49542a800875904e36e6ac9309c96f7f989c (patch) | |
tree | 30d191843a4a112bc4b869bfbb944e539e7c1b65 /astroid/helpers.py | |
parent | ceb81955278f98447153efc6fae4224b2dfb71db (diff) | |
download | astroid-git-2c1e49542a800875904e36e6ac9309c96f7f989c.tar.gz |
Make sure to handle Uninferable by returning it rather than returning an exception
Diffstat (limited to 'astroid/helpers.py')
-rw-r--r-- | astroid/helpers.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/astroid/helpers.py b/astroid/helpers.py index 8ea6c4da..2e633a07 100644 --- a/astroid/helpers.py +++ b/astroid/helpers.py @@ -100,8 +100,8 @@ def object_isinstance(node, class_or_seq, context=None): class_seq = class_or_seq obj_type = object_type(node, context) if obj_type is util.Uninferable: - return exceptions.InferenceError( - "{node} cannot be inferred".format(node=node)) + return util.Uninferable + # Instances are not types class_seq = [item if not isinstance(item, bases.Instance) else util.Uninferable for item in class_seq] |