Skip to content

Help text for count options has [x>=0] appended #2072

@dnicolodi

Description

@dnicolodi

Consider this example, taken more or less verbatim from the documentation:

import click

@click.command()
@click.option('-v', '--verbose', count=True, help='Increase verbosity.')
def log(verbose):
    click.echo(f"Verbosity: {verbose}")

if __name__ == '__main__':
    log()

The help text for this command is:

Usage: count.py [OPTIONS]

Options:
  -v, --verbose  Increase verbosity.  [x>=0]
  --help         Show this message and exit.

I don't know what the [x>=0] part is trying to convey, and I think it should not be there. I don't know when Click started adding it, but it was definitely not there with older versions.

Environment:

  • Python version: 3.9.7
  • Click version: 8.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions