Skip to content

--version, --config, and --verbosity options appear twice in help output in 3.0.1 #232

@rasa

Description

@rasa

Using click_extra 3.0.1, this code:

import logging

import click_extra as click

@click.extra_command()
@click.version_option(version="0.1")
@click.config.config_option(default="ex.yml")
@click.logging.verbosity_option(default="DEBUG")
def cli():
  pass

if __name__ == "__main__":
    cli()

and running

$ python issue232.py -h

produces:

Usage: issue232.py [OPTIONS]

Options:
  --time / --no-time        Measure and print elapsed execution time.  [default:
                            no-time]
  --color, --ansi / --no-color, --no-ansi
                            Strip out all colors and all ANSI codes from output.
                            [default: color]
  -C, --config CONFIG_PATH  Location of the configuration file. Supports both
                            local path and remote URL.  [default: C:\Users\ross\
                            AppData\Roaming\issue232.py\config.{toml,yaml,yml,js
                            on,ini,xml}]
  -v, --verbosity LEVEL     Either CRITICAL, ERROR, WARNING, INFO, DEBUG.
                            [default: INFO]
  --version                 Show the version and exit.
  -h, --help                Show this message and exit.
  --version                 Show the version and exit.
  -C, --config CONFIG_PATH  Location of the configuration file. Supports both
                            local path and remote URL.  [default: ex.yml]
  -v, --verbosity LEVEL     Either CRITICAL, ERROR, WARNING, INFO, DEBUG.
                            [default: DEBUG]

Metadata

Metadata

Assignees

No one assigned

    Labels

    ❔ questionFurther information is requested📚 documentationUpdate to non-code (readme, docstrings, typos, …)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions