Skip to content

Commit b66d969

Browse files
committed
Fix mypy failures on Python 3.12+ CI jobs
mypy was pinned to python_version = "3.11", which made it reject newer numpy stubs that use PEP 695 `type` statements (valid only on 3.12+), failing the 3.12/3.13/3.14 matrix jobs with a syntax error. Drop the pin so mypy targets whichever interpreter it runs under, matching the CI matrix. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015tLcNE8iW7jycc6HZMaZx8
1 parent 2160d77 commit b66d969

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,10 @@ select = ["E", "F", "I", "B", "UP", "N", "RUF", "TID"]
115115
"scripts/inspect_r_api_update.py" = ["TID251"]
116116
"scripts/verify_release_provenance.py" = ["TID251"]
117117

118+
# No python_version pin: mypy targets the interpreter it runs under. The CI
119+
# matrix runs mypy on 3.11-3.14, and pinning to 3.11 made mypy reject newer
120+
# numpy stubs that use PEP 695 `type` statements (valid only on 3.12+).
118121
[tool.mypy]
119-
python_version = "3.11"
120122
strict = true
121123
files = ["src/nns", "tests"]
122124
mypy_path = ["tests"]

0 commit comments

Comments
 (0)