summaryrefslogtreecommitdiff
path: root/astroid/helpers.py
diff options
context:
space:
mode:
Diffstat (limited to 'astroid/helpers.py')
-rw-r--r--astroid/helpers.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/astroid/helpers.py b/astroid/helpers.py
index 00f4784..6d48b0d 100644
--- a/astroid/helpers.py
+++ b/astroid/helpers.py
@@ -86,7 +86,7 @@ def object_type(node, context=None):
This is used to implement the ``type`` builtin, which means that it's
used for inferring type calls, as well as used in a couple of other places
- in the inference.
+ in the inference.
The node will be inferred first, so this function can support all
sorts of objects, as long as they support inference.
"""
@@ -94,9 +94,9 @@ def object_type(node, context=None):
try:
types = set(_object_type(node, context))
except exceptions.InferenceError:
- return util.YES
+ return util.Uninferable
if len(types) > 1 or not types:
- return util.YES
+ return util.Uninferable
return list(types)[0]
@@ -140,7 +140,7 @@ def has_known_bases(klass, context=None):
def _type_check(type1, type2):
if not all(map(has_known_bases, (type1, type2))):
- return util.YES
+ return util.Uninferable
if not all([type1.newstyle, type2.newstyle]):
return False
@@ -148,7 +148,7 @@ def _type_check(type1, type2):
return type1 in type2.mro()[:-1]
except exceptions.MroError:
# The MRO is invalid.
- return util.YES
+ return util.Uninferable
def is_subtype(type1, type2):