What am I doing wrong here? My Click script has no arguments but has multiple options. My script is as follows:
@click.command()
@click.option("--error-percent-threshold")
@click.option("--latency-threshold")
@click.option("--node-type")
@click.option("--master-ip", default="0.0.0.0")
def main(node_type, error_percent_threshold, latency_threshold, master_ip):
"""Something"""
if __name__ == '__main__':
main()
Now when I run my script with python3 script.py --node-type=master --latency-threshold=50 --error-percent-threshold=1
I get the following error:
error: unrecognized arguments: --node-type=master --latency-threshold=50 --error-percent-threshold=1
Why is Click confusing my options as arguments?