From b7bb7ebe6f309c0c59800cca3039e3690aa4ce2b Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Fri, 20 Mar 2020 22:19:10 +0100 Subject: [PATCH] add float support --- tiramisu_cmdline_parser/api.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tiramisu_cmdline_parser/api.py b/tiramisu_cmdline_parser/api.py index 3a6dc38..3b64696 100644 --- a/tiramisu_cmdline_parser/api.py +++ b/tiramisu_cmdline_parser/api.py @@ -545,6 +545,8 @@ class TiramisuCmdlineParser(ArgumentParser): elif option.type() == 'choice' and not option.isfollower(): # do not manage choice with argparse there is problem with integer problem kwargs['choices'] = get_choice_list(obj, properties, False) + elif option.type() == 'float': + kwargs['type'] = float else: pass actions.setdefault(option.name(), []).append(kwargs)