Skip to content

version_option ignores package_name #3125

@marcelloromani

Description

@marcelloromani
import click

PACKAGE_NAME = "click-sub-commands"

@click.command()
@click.version_option(package_name=PACKAGE_NAME)
def main():
    print("Hello world")

if __name__ == "__main__":
    main()

Expected:

click-sub-commands, version 0.1.0

Actual:

main.py, version 0.1.0

Environment:

  • Python version: 3.13.7
  • Click version: 8.3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugf:parametersfeature: input parameter types

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions