I have this chunk of code:
import click
@click.option('--delete_thing', help="Delete some things columns.", default=False)
def cmd_do_this(delete_thing=False):
print "I deleted the thing."
I would like to rename the option variable in --delete-thing
. But python does not allow dashes in variable names. Is there a way to write this kind of code?
import click
@click.option('--delete-thing', help="Delete some things columns.", default=False, store_variable=delete_thing)
def cmd_do_this(delete_thing=False):
print "I deleted the thing."
So delete_thing
will be set to the value of delete-thing