forked from VimPlug/jedi
Move execute_evaluated to a helper function
This commit is contained in:
@@ -237,3 +237,14 @@ def reraise_as_evaluator(*exception_classes):
|
||||
except exception_classes as e:
|
||||
new_exc_cls = globals()['Evaluator' + e.__class__.__name__]
|
||||
raise new_exc_cls(e)
|
||||
|
||||
|
||||
def execute_evaluated(context, *value_list):
|
||||
"""
|
||||
Execute a function with already executed arguments.
|
||||
"""
|
||||
# TODO move this out of here to the evaluator.
|
||||
from jedi.evaluate.arguments import ValuesArguments
|
||||
from jedi.evaluate.base_context import ContextSet
|
||||
arguments = ValuesArguments([ContextSet(value) for value in value_list])
|
||||
return context.evaluator.execute(context, arguments)
|
||||
|
||||
Reference in New Issue
Block a user