mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
Remove get_object, it's not needed anymore
This commit is contained in:
@@ -334,10 +334,7 @@ def builtins_isinstance(objects, types, arguments, inference_state):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class StaticMethodObject(AttributeOverwrite, ValueWrapper):
|
class StaticMethodObject(ValueWrapper):
|
||||||
def get_object(self):
|
|
||||||
return self._wrapped_value
|
|
||||||
|
|
||||||
def py__get__(self, instance, klass):
|
def py__get__(self, instance, klass):
|
||||||
return ValueSet([self._wrapped_value])
|
return ValueSet([self._wrapped_value])
|
||||||
|
|
||||||
@@ -347,14 +344,11 @@ def builtins_staticmethod(functions):
|
|||||||
return ValueSet(StaticMethodObject(f) for f in functions)
|
return ValueSet(StaticMethodObject(f) for f in functions)
|
||||||
|
|
||||||
|
|
||||||
class ClassMethodObject(AttributeOverwrite, ValueWrapper):
|
class ClassMethodObject(ValueWrapper):
|
||||||
def __init__(self, class_method_obj, function):
|
def __init__(self, class_method_obj, function):
|
||||||
super(ClassMethodObject, self).__init__(class_method_obj)
|
super(ClassMethodObject, self).__init__(class_method_obj)
|
||||||
self._function = function
|
self._function = function
|
||||||
|
|
||||||
def get_object(self):
|
|
||||||
return self._wrapped_value
|
|
||||||
|
|
||||||
def py__get__(self, obj, class_value):
|
def py__get__(self, obj, class_value):
|
||||||
return ValueSet([
|
return ValueSet([
|
||||||
ClassMethodGet(__get__, class_value, self._function)
|
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):
|
def __init__(self, get_method, klass, function):
|
||||||
super(ClassMethodGet, self).__init__(get_method)
|
super(ClassMethodGet, self).__init__(get_method)
|
||||||
self._class = klass
|
self._class = klass
|
||||||
@@ -371,9 +365,6 @@ class ClassMethodGet(AttributeOverwrite, ValueWrapper):
|
|||||||
def get_signatures(self):
|
def get_signatures(self):
|
||||||
return self._function.get_signatures()
|
return self._function.get_signatures()
|
||||||
|
|
||||||
def get_object(self):
|
|
||||||
return self._wrapped_value
|
|
||||||
|
|
||||||
def py__call__(self, arguments):
|
def py__call__(self, arguments):
|
||||||
return self._function.execute(ClassMethodArguments(self._class, arguments))
|
return self._function.execute(ClassMethodArguments(self._class, arguments))
|
||||||
|
|
||||||
@@ -403,9 +394,6 @@ class PropertyObject(AttributeOverwrite, ValueWrapper):
|
|||||||
super(PropertyObject, self).__init__(property_obj)
|
super(PropertyObject, self).__init__(property_obj)
|
||||||
self._function = function
|
self._function = function
|
||||||
|
|
||||||
def get_object(self):
|
|
||||||
return self._wrapped_value
|
|
||||||
|
|
||||||
def py__get__(self, instance, class_value):
|
def py__get__(self, instance, class_value):
|
||||||
if instance is None:
|
if instance is None:
|
||||||
return NO_VALUES
|
return NO_VALUES
|
||||||
|
|||||||
Reference in New Issue
Block a user