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:
1 parent
0e66aef511
commit
9abc8a19e7
3 files changed
+25
-2
No files matched your search
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user