Consider the following code:
import click
@click.command()
@click.option("--answer", flag_value=42)
def main(answer):
click.echo(repr(answer))
if __name__ == '__main__':
main()
Under click 7, passing the --answer option to this script prints 42 (an int), as expected. Under click 8, it prints '42' (a str).
Environment:
- Python version: 3.9.5
- Click version: 7.1.2 vs. 8.0.0
Consider the following code:
Under click 7, passing the
--answeroption to this script prints42(an int), as expected. Under click 8, it prints'42'(a str).Environment: