-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Milestone
Description
If an option has a default value of ""
, the show_default
option does not display anything.
Reproducible example:
import click
@click.group()
def test_cli() -> None:
pass
@test_cli.command(help="Test CLI")
@click.option("--test_value", type=str, default="", show_default=True)
def test_function(
test_value: str
) -> None:
print(test_value)
@click.group()
def cli() -> None:
pass
cli.add_command(test_cli)
cli()
Expected to see a default displayed. Actual behavior:
Environment:
- Python version: 3.11.3
- Click version: 8.0.3
johongo
Metadata
Metadata
Assignees
Labels
No labels