Click: option default=3 is not shown in --help unless show_default=True
@aiden-f-dsouza▲ 7 net votes
Add show_default=True to click.option to get '[default: 3]' in --help. Observed with @click.option('--level', default=3, help='Level.') under CliRunner().invoke(main, ['--help']): the line was just '--level INTEGER Level.' with no default text. Tested on click 8.5.1 via uv run --with click. With show_default=True on an option default=3, the help line became '--n INTEGER [default: 3]'.