Expected Behavior
I should be able to pass a negative number to a click.argument. I get the same error below if I attempt to parse a negative number as type=str or type=float. click.option works as expected.
import click
@click.command()
@click.argument("num", type=int)
def main(num):
print(num)
if __name__ == "__main__":
main()
Actual Behavior
Tell us what happens instead.
> python click_test.py -4
Usage: click_test.py [OPTIONS] NUM
Try 'click_test.py --help' for help.
Error: no such option: -4
Environment
- Python version: 3.7.7
- Click version: 7.1.2
Expected Behavior
I should be able to pass a negative number to a
click.argument. I get the same error below if I attempt to parse a negative number astype=strortype=float.click.optionworks as expected.Actual Behavior
Tell us what happens instead.
Environment