forked from VimPlug/jedi
Improve a few anonymous function execution context goto issues.
This commit is contained in:
@@ -143,19 +143,20 @@ def _evaluate_for_statement_string(module_context, string):
|
||||
return []
|
||||
|
||||
from jedi.evaluate.param import ValuesArguments
|
||||
from jedi.evaluate.representation import FunctionExecutionContext
|
||||
func_context = FunctionExecutionContext(
|
||||
from jedi.evaluate.representation import FunctionContext
|
||||
function_context = FunctionContext(
|
||||
module_context.evaluator,
|
||||
module_context,
|
||||
funcdef,
|
||||
funcdef
|
||||
)
|
||||
func_execution_context = function_context.get_function_execution(
|
||||
ValuesArguments([])
|
||||
)
|
||||
|
||||
# Use the module of the param.
|
||||
# TODO this module is not the module of the param in case of a function
|
||||
# call. In that case it's the module of the function call.
|
||||
# stuffed with content from a function call.
|
||||
return list(_execute_types_in_stmt(func_context, stmt))
|
||||
return list(_execute_types_in_stmt(func_execution_context, stmt))
|
||||
|
||||
|
||||
def _execute_types_in_stmt(module_context, stmt):
|
||||
|
||||
Reference in New Issue
Block a user