Skip to content

"--version" option does not produce output matching an existing git tag #19212

Open
@david-mcdowell-ilw

Description

@david-mcdowell-ilw

Bug Report

$ mypy --version
mypy 1.15.0 (compiled: yes)

This version output does not match an existing tag in git.

https://github.com/python/mypy/tags
https://github.com/python/mypy/releases/tag/v1.15.0

I would expect either the --version option to return the version number with a "v" prefix or the git tags to omit the "v" prefix to match the version output.

The existing behavior causes issues where other tools or users are using the --version output to point to a git tag (e.g., when defining a pre-commit hook, or e.g., when aggregating versions of many linters and formatters like in super-linter).

related issue: super-linter/super-linter#6826

Your Environment

  • Mypy version used: v1.15.0
  • Mypy command-line flags: --version
  • Mypy configuration options from mypy.ini (and other config files): N/A
  • Python version used: 3.12

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrong

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions