mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-16 02:27:06 +08:00
Remove unused code.
This commit is contained in:
@@ -10,7 +10,6 @@ from jedi.evaluate.cache import evaluator_method_cache
|
||||
from jedi.evaluate.param import AbstractArguments, AnonymousArguments
|
||||
from jedi.cache import memoize_method
|
||||
from jedi.evaluate import representation as er
|
||||
from jedi.evaluate.dynamic import search_params
|
||||
from jedi.evaluate import iterable
|
||||
from jedi.parser_utils import get_parent_scope
|
||||
|
||||
@@ -402,39 +401,6 @@ class SelfNameFilter(InstanceClassFilter):
|
||||
return names
|
||||
|
||||
|
||||
class ParamArguments(object):
|
||||
"""
|
||||
TODO This seems like a strange class, clean up?
|
||||
"""
|
||||
class LazyParamContext(object):
|
||||
def __init__(self, fucking_param):
|
||||
self._param = fucking_param
|
||||
|
||||
def infer(self):
|
||||
return self._param.infer()
|
||||
|
||||
def __init__(self, execution_context, funcdef):
|
||||
self._execution_context = execution_context
|
||||
self._funcdef = funcdef
|
||||
|
||||
def unpack(self, func=None):
|
||||
params = search_params(
|
||||
self._execution_context.evaluator,
|
||||
self._execution_context,
|
||||
self._funcdef
|
||||
)
|
||||
is_first = True
|
||||
for p in params:
|
||||
# TODO Yeah, here at last, the class seems to be really wrong.
|
||||
if is_first:
|
||||
is_first = False
|
||||
continue
|
||||
yield None, self.LazyParamContext(p)
|
||||
|
||||
def get_calling_nodes(self):
|
||||
return []
|
||||
|
||||
|
||||
class InstanceVarArgs(AbstractArguments):
|
||||
def __init__(self, execution_context, var_args):
|
||||
self._execution_context = execution_context
|
||||
|
||||
@@ -80,7 +80,6 @@ class AbstractArguments():
|
||||
return get_params(execution_context, self)
|
||||
|
||||
|
||||
|
||||
class AnonymousArguments(AbstractArguments):
|
||||
def get_params(self, execution_context):
|
||||
from jedi.evaluate.dynamic import search_params
|
||||
|
||||
@@ -265,11 +265,10 @@ class FunctionContext(use_metaclass(CachedMetaClass, context.TreeContext)):
|
||||
return function_execution.get_return_values()
|
||||
|
||||
def get_function_execution(self, arguments=None):
|
||||
e = self.evaluator
|
||||
if arguments is None:
|
||||
arguments = param.AnonymousArguments()
|
||||
|
||||
return FunctionExecutionContext(e, self.parent_context, self, arguments)
|
||||
return FunctionExecutionContext(self.evaluator, self.parent_context, self, arguments)
|
||||
|
||||
def py__call__(self, arguments):
|
||||
function_execution = self.get_function_execution(arguments)
|
||||
|
||||
Reference in New Issue
Block a user