1
0
forked from VimPlug/jedi

By adding a py__class__ method to CompiledObject and Class, we Jedi is able to understand isinstance checks, now.

This also includes a CheckAttribute class in evaluatue.compiled, because it's way easier to generalize the AttributeErrors there.
This commit is contained in:
Dave Halter
2014-08-20 14:46:18 +02:00
parent 0e66aef511
commit 9abc8a19e7
3 changed files with 25 additions and 2 deletions

View File

@@ -110,6 +110,9 @@ class Instance(use_metaclass(CachedMetaClass, Executed)):
return actual
def py__class__(self, evaluator):
return self.base
def py__bool__(self):
# Signalize that we don't know about the bool type.
return None