-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
Hi,
is there any way to set negative number as argument ?
# -*- coding: utf-8 -*-
from clize import ArgumentError, Parameter, run
def cli_main(arg:float, *, debug:'d'=False):
"""cli_main
:param arg: arg parameter
:param debug: debug flag
"""
return (arg,debug)
if __name__ == '__main__' :
run (cli_main)
>python cli.py --help
Usage: cli.py [OPTIONS] arg
cli_main
Arguments:
arg arg paramter (type: FLOAT)
Options:
-d, --debug debug flag
Other actions:
-h, --help Show the help
>python cli.py -10.0
cli.py: Unknown option '-1'
Usage: cli.py [OPTIONS] arg
Metadata
Metadata
Assignees
Labels
No labels