If I try to pass a negative number to click, it interprets it as an option. This happens when I define the number either as int, float or leave it to default to string.
Here's a tiny example to illustrate the issue
import click
@click.command()
@click.argument('number', type=float)
def main(number):
print(number)
if __name__ == '__main__':
main()
and I run it as
❯ python tmp.py '-10'
Error: no such option: -1
or even as
❯ python tmp.py -10
Error: no such option: -1
EDIT: I am running Python 3.5.1 and Click version 6.3 installed through the Anaconda python distribution.
If I try to pass a negative number to click, it interprets it as an option. This happens when I define the number either as
int,floator leave it to default tostring.Here's a tiny example to illustrate the issue
and I run it as
or even as
EDIT: I am running Python 3.5.1 and Click version 6.3 installed through the Anaconda python distribution.