~fabrixxm/climatik

0b05d22a3181f17ca6eeb14c81060b8cd15db5bc — fabrixxm 2 years ago 296bc40
Fix arguments default type
1 files changed, 1 insertions(+), 1 deletions(-)

M climatik/__init__.py
M climatik/__init__.py => climatik/__init__.py +1 -1
@@ 277,7 277,7 @@ def command(fnc:Callable, command_name:str=None, group_name:str=''):
                arg['type'] = type(param.default)

        # we don't want arguments with type "None". default to "str"
        if 'type' in arg and arg['type'] == type(None):
        if not 'type' in arg or arg['type'] == type(None):
            arg['type'] = str

        # if argument type is bool, the argument become a switch