mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-11 09:08:43 +08:00
Better display of descriptors
This commit is contained in:
@@ -91,7 +91,7 @@ def safe_getattr(obj, name, default=_sentinel):
|
|||||||
raise
|
raise
|
||||||
return default
|
return default
|
||||||
else:
|
else:
|
||||||
if is_get_descriptor and type(attr) in ALLOWED_DESCRIPTOR_ACCESS:
|
if type(attr) in ALLOWED_DESCRIPTOR_ACCESS:
|
||||||
# In case of descriptors that have get methods we cannot return
|
# In case of descriptors that have get methods we cannot return
|
||||||
# it's value, because that would mean code execution.
|
# it's value, because that would mean code execution.
|
||||||
return getattr(obj, name)
|
return getattr(obj, name)
|
||||||
|
|||||||
Reference in New Issue
Block a user