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

@@ -140,7 +140,7 @@ def builtins_isinstance(evaluator, obj, params):
for o in obj:
for cls in classes:
try:
mro_func = o.base.py__mro__
mro_func = o.py__class__(evaluator).py__mro__
except AttributeError:
return any_bool
else: