From 6674eedfae8edd18ec16b83334ddd3752eb7c9c5 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sat, 6 Sep 2014 21:38:05 +0200 Subject: [PATCH] cmdutils: Add default value type to multitype_conv tuple. --- qutebrowser/commands/cmdutils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qutebrowser/commands/cmdutils.py b/qutebrowser/commands/cmdutils.py index 33cace1dc..2e3e8c344 100644 --- a/qutebrowser/commands/cmdutils.py +++ b/qutebrowser/commands/cmdutils.py @@ -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)