Skip to content

Clarify python_version parser behavior#21498

Open
Sean-Kenneth-Doherty wants to merge 1 commit into
python:masterfrom
Sean-Kenneth-Doherty:codex/clarify-python-version-docs
Open

Clarify python_version parser behavior#21498
Sean-Kenneth-Doherty wants to merge 1 commit into
python:masterfrom
Sean-Kenneth-Doherty:codex/clarify-python-version-docs

Conversation

@Sean-Kenneth-Doherty
Copy link
Copy Markdown

Refs #19729.

This documents the current python_version / --python-version behavior more precisely: the option changes type-checking assumptions, including version checks, but mypy still parses source using the Python interpreter that is running mypy.

The note avoids adding a validation restriction because newer target versions can still be useful for version-guarded code, while clarifying that newer syntax requires running mypy on an interpreter that can parse it.

Disclosure: prepared with Codex assistance.

Test plan:

  • git diff --check
  • uv run --isolated --with-requirements docs/requirements-docs.txt sphinx-build -W --keep-going -b html docs/source /tmp/mypy-docs-html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant