mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-22 13:21:26 +08:00
Fix some property issues
This commit is contained in:
@@ -65,12 +65,17 @@ class StdlibPlugin(BasePlugin):
|
|||||||
module_name = ''
|
module_name = ''
|
||||||
|
|
||||||
if isinstance(context, BoundMethod):
|
if isinstance(context, BoundMethod):
|
||||||
if module_name == 'builtins' and context.py__name__() == '__get__':
|
if module_name == 'builtins':
|
||||||
|
if context.py__name__() == '__get__':
|
||||||
if context.class_context.py__name__() == 'property':
|
if context.class_context.py__name__() == 'property':
|
||||||
return builtins_property(
|
return builtins_property(
|
||||||
context,
|
context,
|
||||||
arguments=arguments
|
arguments=arguments
|
||||||
)
|
)
|
||||||
|
elif context.py__name__() in ('deleter', 'getter', 'setter'):
|
||||||
|
if context.class_context.py__name__() == 'property':
|
||||||
|
return ContextSet([context.instance])
|
||||||
|
|
||||||
return callback(context, arguments=arguments)
|
return callback(context, arguments=arguments)
|
||||||
|
|
||||||
# for now we just support builtin functions.
|
# for now we just support builtin functions.
|
||||||
|
|||||||
Reference in New Issue
Block a user