1
0
forked from VimPlug/jedi

Function for evaluating functions with already executed arguments.

This commit is contained in:
Dave Halter
2014-11-23 19:12:25 +01:00
parent 8adfc47297
commit 267016f533
6 changed files with 35 additions and 16 deletions

View File

@@ -200,7 +200,7 @@ def get_params(evaluator, func, var_args):
from jedi.evaluate.representation import InstanceElement
if isinstance(func, InstanceElement):
# Include self at this place.
unpacked_va.insert(0, (None, [func.instance]))
unpacked_va.insert(0, (None, [iterable.AlreadyEvaluated([func.instance])]))
var_arg_iterator = common.PushBackIterator(iter(unpacked_va))
non_matching_keys = defaultdict(lambda: [])
@@ -289,6 +289,7 @@ def get_params(evaluator, func, var_args):
result.append(_gen_param_name_copy(evaluator, func, var_args,
param, [], values))
if not (non_matching_keys or had_multiple_value_error
or param.stars or param.default):
# add a warning only if there's not another one.