diff --git a/jedi/evaluate/param.py b/jedi/evaluate/param.py index 387c6751..fb1735a7 100644 --- a/jedi/evaluate/param.py +++ b/jedi/evaluate/param.py @@ -49,6 +49,8 @@ def _get_calling_var_args(evaluator, var_args): param = names[0].parent if not isinstance(param, ExecutedParam): break + # We never want var_args to be a tuple. This should be enough for + # now, we can change it later, if we need to. if isinstance(param.var_args, pr.Array): var_args = param.var_args return var_args diff --git a/test/static_analysis/arguments.py b/test/static_analysis/arguments.py index 95d01bc7..9e1d7965 100644 --- a/test/static_analysis/arguments.py +++ b/test/static_analysis/arguments.py @@ -13,12 +13,6 @@ simple() simple(1, 2) -def nested(*args): - return simple(*args) - -nested(1) -#! 6 type-error-too-few-arguments -nested() #! 10 type-error-too-many-arguments simple(1, 2, 3) diff --git a/test/static_analysis/star_arguments.py b/test/static_analysis/star_arguments.py new file mode 100644 index 00000000..41ef58f7 --- /dev/null +++ b/test/static_analysis/star_arguments.py @@ -0,0 +1,10 @@ + +def simple(a): + return a + +def nested(*args): + return simple(*args) + +nested(1) +#! 6 type-error-too-few-arguments +nested()