mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 14:04:26 +08:00
Remove special objects, they are no longer needed
This commit is contained in:
@@ -46,13 +46,6 @@ def create_simple_object(evaluator, obj):
|
|||||||
return CompiledValue(instance, compiled_obj)
|
return CompiledValue(instance, compiled_obj)
|
||||||
|
|
||||||
|
|
||||||
def get_special_object(evaluator, identifier):
|
|
||||||
return create_from_access_path(
|
|
||||||
evaluator,
|
|
||||||
evaluator.compiled_subprocess.get_special_object(identifier)
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def get_string_context_set(evaluator):
|
def get_string_context_set(evaluator):
|
||||||
return execute_evaluated(builtin_from_name(evaluator, u'str'))
|
return execute_evaluated(builtin_from_name(evaluator, u'str'))
|
||||||
|
|
||||||
|
|||||||
@@ -438,12 +438,3 @@ def _is_class_instance(obj):
|
|||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
return cls != type and not issubclass(cls, NOT_CLASS_TYPES)
|
return cls != type and not issubclass(cls, NOT_CLASS_TYPES)
|
||||||
|
|
||||||
|
|
||||||
class _SPECIAL_OBJECTS(object):
|
|
||||||
BOUND_METHOD_CLASS = type(DirectObjectAccess(None, None).py__bool__)
|
|
||||||
|
|
||||||
|
|
||||||
def get_special_object(evaluator, identifier):
|
|
||||||
obj = getattr(_SPECIAL_OBJECTS, identifier)
|
|
||||||
return create_access_path(evaluator, obj)
|
|
||||||
|
|||||||
@@ -21,10 +21,6 @@ def get_compiled_method_return(evaluator, id, attribute, *args, **kwargs):
|
|||||||
return getattr(handle.access, attribute)(*args, **kwargs)
|
return getattr(handle.access, attribute)(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
def get_special_object(evaluator, identifier):
|
|
||||||
return access.get_special_object(evaluator, identifier)
|
|
||||||
|
|
||||||
|
|
||||||
def create_simple_object(evaluator, obj):
|
def create_simple_object(evaluator, obj):
|
||||||
return access.create_access_path(evaluator, obj)
|
return access.create_access_path(evaluator, obj)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user