chore(ruff): the acceptance was whatever the default happened to be [skip-docs]
`uv sync --frozen` resolved ruff 0.15.22 and the tree read clean. A loose install resolves 0.16.6, under which the SAME untouched code reports 148 findings -- 4 more than round 9 counted, because this round added four files. All of them are new rules rather than new defects: 0.16 widened the default rule set to whole families (YTT, ASYNC, PL, ISC, C4, UP, B, SIM, FURB, ...). (`[skip-docs]` is for CLAUDE.md, which a lint-configuration change does not reach. README's developer section IS updated in this commit.) THE DEFECT IS NOT THE 148, IT IS THAT NOBODY CHOSE THEM. `[tool.ruff]` set only `line-length` and `target-version`, so the acceptance was ruff's default, and the tree stayed green only as long as the lockfile froze an old ruff. `select` is now written down: `E4`, `E7`, `E9`, `F` (the historical default), `I` because this tree already keeps imports sorted, and `RUF100` so a `noqa` that has stopped meaning anything is caught rather than left as decoration. Pin `ruff>=0.9` -> `ruff>=0.16.6,<0.17`. Per rule, before -> after: RUF100 50 -> 0, I001 20 -> 0, ISC004 19, PLW1510 8, C408 8, EXE001 6, RUF007 5, PLE2515 4, UP031 3, B017 3, and fourteen more with 2 or fewer -- the families out of the declared set are 0 by selection, and 148 is the number to start from if they are adopted, which is a separate decision and not one to take inside a version-pin commit. 57 were auto-fixed; one E402 was reintroduced by the import-sorting fix merging a block away from its `noqa`, and got the directive back rather than a bare one. `S` IS MEASURED OUT, NOT ASSUMED OUT: it reports 2657 `S101` on a suite whose every assertion is an `assert`, and `S603` flags 19 subprocess calls of which one was ever marked -- selecting it buys 18 suppressions and no defect. Two `noqa` directives naming non-selected rules were dropped with that reason recorded in the configuration instead. THE TWO FILES 0.16 WOULD REFORMAT ARE MARKDOWN, NOT PYTHON: `README.md` and `docs/2026-09-08-blindsone-below-k-k2.md`. 0.16 formats fenced Python inside markdown, and both blocks are RECORDS -- the second is a quotation of `COST_VOCABULARY` as it stood when that measurement was taken. Reformatting a quotation makes it stop being one, so markdown is excluded from the formatter and `ruff format --check .` stays in the acceptance over `.py`. `tools/okf_consume_measure.py` is fenced by the order as run-not-edited, so its three findings are exempted by path with the reason and the debt named, and its bytes are untouched. THE LOCKFILE TRAP IS CLOSED, NOT AVOIDED. `uv.lock` predated the `[ocr]` extra, so any unlocked resolve wrote that extra's transitive tree back into it -- 681 insertions over 4 deletions, twice now, and round 9 recorded the cause as `uv run` OUTSIDE the project when it is `uv run` without `--frozen` INSIDE it. The relock is complete for every declared extra (703 insertions, 26 deletions), and measured after it, an unfrozen `uv run` leaves the file alone. `ruff check src tests tools`, `ruff format --check .` (0.16.6), `mypy src` over 21 files and 1535 tests, all green. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
191de89f41
commit
36c201cc8a
37 changed files with 843 additions and 105 deletions
29
README.md
29
README.md
|
|
@ -707,17 +707,26 @@ an uninstalled extra run in both. The suite is not shipped in an installed
|
|||
distribution — `tests/` lives at the repository root, so this command needs a
|
||||
clone rather than a `pip install`.
|
||||
|
||||
**The lint acceptance is BOTH of ruff's gates.** `ruff check src tests tools`
|
||||
*and* `ruff format --check .`, both named in a report with the version they ran
|
||||
under. The second was not in the acceptance until 2026-09-09, and it had gone
|
||||
red unseen: an acceptance that names one of a tool's two gates reports green
|
||||
for the gate it never ran. Add `--extra extract` to the sync or `mypy src`
|
||||
cannot find `pdfplumber`.
|
||||
**The lint acceptance is BOTH of ruff's gates, and the rule set is declared.**
|
||||
`ruff check src tests tools` *and* `ruff format --check .`, both named in a
|
||||
report with the version they ran under. Neither was true before 2026-09-09:
|
||||
the formatter gate was not in the acceptance and had gone red unseen, and
|
||||
`[tool.ruff]` set only `line-length` and `target-version`, so the acceptance
|
||||
was whatever ruff's default happened to be — which is why the tree read green
|
||||
only as long as `uv.lock` froze ruff at 0.15.22. Under 0.16.6 the same
|
||||
untouched code reported **148** findings, all of them new rules rather than new
|
||||
defects, because 0.16 widened the default set to whole families. `select` is
|
||||
now written down (`E4`, `E7`, `E9`, `F`, `I`, `RUF100`), the dev pin is
|
||||
`ruff>=0.16.6,<0.17`, and the wider families are a separate decision with 148
|
||||
as its starting number. `S` is measured out rather than assumed out: it reports
|
||||
**2657** `S101` on a suite whose every assertion is an `assert`. Add
|
||||
`--extra extract` to the sync or `mypy src` cannot find `pdfplumber`.
|
||||
|
||||
**Use `uv run --frozen`, not `uv run`.** The committed lockfile predates the
|
||||
`[ocr]` extra, so any unlocked resolve writes that extra's whole transitive
|
||||
tree back into `uv.lock` — measured, 681 insertions over 4 deletions, pulling
|
||||
in packages this project does not use.
|
||||
**Markdown is excluded from `ruff format`.** ruff 0.16 formats fenced Python
|
||||
inside markdown, and the two files it would change here are records rather than
|
||||
source — a README call example and a published measurement's *quotation* of
|
||||
`COST_VOCABULARY` as it stood when that measurement was taken. Reformatting a
|
||||
quotation makes it stop being one.
|
||||
|
||||
A git URL is a PEP 508 direct reference and pins one exact tag, so it is an
|
||||
install-time *channel*, not the pin: the range above stays the declared
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue