mirror of
https://github.com/davidhalter/jedi.git
synced 2026-10-11 00:19:11 +08:00
Catch an error with illegal class instances, fixes #1491
This commit is contained in:
1 parent
2c62166ff6
commit
eb88c483fb
2 files changed
+13
-1
No files matched your search
@@ -570,4 +570,6 @@ def _is_class_instance(obj):
|
||||
except AttributeError:
|
||||
return False
|
||||
else:
|
||||
return cls != type and not issubclass(cls, NOT_CLASS_TYPES)
|
||||
# The isinstance check for cls is just there so issubclass doesn't
|
||||
# raise an exception.
|
||||
return cls != type and isinstance(cls, type) and not issubclass(cls, NOT_CLASS_TYPES)
|
||||
Reference in new issue
Block a user