Move execute_evaluated to a helper function
This commit is contained in:
1 parent
faba29a42b
commit
7a48fdc5f6
10 files changed
+30
-22
No files matched your search
@@ -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