cmdutils: Add default value type to multitype_conv tuple.
This commit is contained in:
parent
13a2506c6a
commit
6674eedfae
@ -238,6 +238,8 @@ class register: # pylint: disable=invalid-name
|
||||
if utils.is_enum(typ):
|
||||
type_conv[param.name] = argparser.enum_getter(typ)
|
||||
elif isinstance(typ, tuple):
|
||||
if param.default is not inspect.Parameter.empty:
|
||||
typ = typ + (type(param.default),)
|
||||
type_conv[param.name] = argparser.multitype_conv(typ)
|
||||
callsig = debugutils.format_call(self.parser.add_argument,
|
||||
args, kwargs, full=False)
|
||||
|
Loading…
Reference in New Issue
Block a user