This commit is contained in:
Emmanuel Garette 2018-04-16 21:07:20 +02:00
parent 8b82e393fe
commit 0b66c96f5e
1 changed files with 12 additions and 14 deletions

View File

@ -203,20 +203,18 @@ class Base(object):
calculator.__name__,
self.impl_get_display_name()))
has_index = False
if is_multi and func_args:
# there is extra args/kwargs
if not self.impl_is_dynoptiondescription():
if calculator_params is None:
calculator_params = Params()
params = list(calculator_params.args)
if add_value:
# only for validator
params.append(ParamOption(self))
func_args.pop()
if func_args:
has_index = True
params.append(ParamIndex())
func_args.pop()
if is_multi and func_args and not self.impl_is_dynoptiondescription():
if calculator_params is None:
calculator_params = Params()
params = list(calculator_params.args)
if add_value:
# only for validator
params.append(ParamOption(self))
func_args.pop()
if func_args:
has_index = True
params.append(ParamIndex())
func_args.pop()
calculator_params.args = tuple(params)
if func_args:
raise ConfigError(_('missing those arguments "{}" in function "{}" for "{}"'