testsAndMisc/docs/superpowers/contracts/python-314-lint-target-2026-08-29.json
Krzysztof kuhy Rudnicki adf2e402df Grade against 3.14 too, not just run on it
`requires-python` and the CI pin already said 3.14, but ruff, mypy and pylint
were still grading `meta/` against 3.10 -- three tools judging an interpreter
nothing runs any more, and ruff withholding the pyupgrade fixes that only
become safe at the newer target. `pin_ci_python.py` rewrites these three knobs.

What the stale target was hiding: `datetime.timezone.utc` where `datetime.UTC`
is now correct (UP017), and ruff's stable formatter applying PEP 758 --
`except (A, B):` becomes `except A, B:`. That makes the source 3.14-only at the
syntax level, which is what `requires-python = ">=3.14"` already promised; kuhy
chose it deliberately over holding ruff a release back (2026-08-29).

Also drops a comment in `wsg_grabber/models.py` that the bump makes false: it
explained why the file used ``str, Enum`` instead of ``StrEnum`` under mypy at
3.10, sitting directly above a ``class Verdict(StrEnum)`` that had already
stopped obeying it.

ruff, ruff-format, mypy --strict and pylint all clean at the new target.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SfnJmxxsZ534AKk16rC2Gr
2026-08-29 11:50:39 +02:00

19 lines
1.1 KiB
JSON

{
"title": "Grade against 3.14, not just run on it",
"objective": "meta/pyproject.toml's ruff, mypy and pylint targets must name the same Python that requires-python and the CI pin already name (3.14), and the tree must be clean under those targets. Success is every lint, type and style gate passing at py314 with no suppressions added.",
"acceptance_criteria": [
"meta/pyproject.toml has target-version = \"py314\", python_version = \"3.14\" and py-version = \"3.14\"",
"pre-commit run ruff --all-files passes",
"pre-commit run ruff-format --all-files passes",
"pre-commit run mypy --all-files passes",
"pre-commit run pylint --all-files passes",
"No noqa, type: ignore or per-file-ignores were added"
],
"out_of_scope": [
"Dependency version pins (handled by the separate freshness gate and its own commit)",
"CI workflow files, which already pin python-version 3.x",
"app/ and web/ subtrees, which are not Python"
],
"verifier": "pre-commit run --all-files (ruff, ruff-format, mypy, pylint), plus the repo's CI mirror on push"
}