diff --git a/jedi/plugins/stdlib.py b/jedi/plugins/stdlib.py index 8bf2d33f..cd4ab01f 100644 --- a/jedi/plugins/stdlib.py +++ b/jedi/plugins/stdlib.py @@ -334,10 +334,7 @@ def builtins_isinstance(objects, types, arguments, inference_state): ) -class StaticMethodObject(AttributeOverwrite, ValueWrapper): - def get_object(self): - return self._wrapped_value - +class StaticMethodObject(ValueWrapper): def py__get__(self, instance, klass): return ValueSet([self._wrapped_value]) @@ -347,14 +344,11 @@ def builtins_staticmethod(functions): return ValueSet(StaticMethodObject(f) for f in functions) -class ClassMethodObject(AttributeOverwrite, ValueWrapper): +class ClassMethodObject(ValueWrapper): def __init__(self, class_method_obj, function): super(ClassMethodObject, self).__init__(class_method_obj) self._function = function - def get_object(self): - return self._wrapped_value - def py__get__(self, obj, class_value): return ValueSet([ ClassMethodGet(__get__, class_value, self._function) @@ -362,7 +356,7 @@ class ClassMethodObject(AttributeOverwrite, ValueWrapper): ]) -class ClassMethodGet(AttributeOverwrite, ValueWrapper): +class ClassMethodGet(ValueWrapper): def __init__(self, get_method, klass, function): super(ClassMethodGet, self).__init__(get_method) self._class = klass @@ -371,9 +365,6 @@ class ClassMethodGet(AttributeOverwrite, ValueWrapper): def get_signatures(self): return self._function.get_signatures() - def get_object(self): - return self._wrapped_value - def py__call__(self, arguments): return self._function.execute(ClassMethodArguments(self._class, arguments)) @@ -403,9 +394,6 @@ class PropertyObject(AttributeOverwrite, ValueWrapper): super(PropertyObject, self).__init__(property_obj) self._function = function - def get_object(self): - return self._wrapped_value - def py__get__(self, instance, class_value): if instance is None: return NO_VALUES