python / python/mypy

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

Open
#19,212 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
20.6k
Forks
3.3k
PR merge metrics
PR metrics pending

Description

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: https://github.com/super-linter/super-linter/issues/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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the reported mypy --version command and tracing the CLI entry point that formats its version output. Compare the result with the existing v1.15.0 tag, then verify that the chosen convention is consistent and covered by an appropriate version-output check.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, python
Domain
cli, release
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.