I'm wondering how to override destination variable for the click.option
(Click lib). For example in such piece of code
import click
@click.command()
@click.option('--output', default='data')
def generate_data(output_folder):
print(output_folder)
So I want to use --output
flag but pass its value to output_folder
argument, kinda this: @click.option('--output', default='data', dest='output_folder')
?
Is there is such an ability in click? I know that argparse allow such a behaviour.
TypeError: Arguments take exactly one parameter declaration, got 2.
– Massenet