Conversation
why: uv's global `exclude-newer = "3 days"` supply-chain cooldown hides ruff 0.16.0 (released 2026-07-23) from the resolver, so the version floor in the next commit cannot resolve. what: - Add `ruff = false` to `[tool.uv.exclude-newer-package]` Temporary. Revert before merge - the cooldown clears on its own and the `ruff>=0.16` floor is what actually holds the version.
why: ruff 0.16.0 stabilizes rules inside prefixes this project already selects and starts formatting Python code blocks in Markdown. Pinning a floor keeps contributors and CI on the same diagnostics instead of splitting on whatever ruff each machine resolved. what: - Raise `ruff` to `>=0.16.0` in the `dev` and `lint` dependency groups - Relock `uv.lock`: ruff 0.15.22 -> 0.16.0 https://astral.sh/blog/ruff-v0.16.0
why: ruff 0.16.0 formats Python and pycon code blocks inside Markdown by default, so `ruff format --check` now fails on documentation that was previously out of its reach. The churn is mechanical - ruff's quote normalization, not a prose or behavior change. what: - Reformat the `conf.py` snippets in `AGENTS.md` and `README.md` https://astral.sh/blog/ruff-v0.16.0
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #82 +/- ##
==========================================
+ Coverage 76.32% 76.68% +0.35%
==========================================
Files 15 15
Lines 1018 1025 +7
==========================================
+ Hits 777 786 +9
+ Misses 241 239 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
why: The ruff floor changes what contributors need installed locally, so it belongs in the unreleased entry rather than only in the diff. what: - Add a `### Development` deliverable for `ruff>=0.16.0`
why: ruff 0.16.0 published 2026-07-23T19:10Z and has now cleared uv's 3-day supply-chain cooldown, so the resolver reaches it unaided. The `ruff>=0.16.0` floor is what holds the version; leaving the exemption would permanently opt ruff out of the cooldown guard. what: - Drop `ruff = false` from `[tool.uv.exclude-newer-package]` - Relock: the setting is recorded in `uv.lock`, so removing it forces a re-resolve. ruff stays at 0.16.0 and no other package moves. This reverts commit f6474be.
why: ruff 0.16 ships a curated default rule set as its recommended baseline. An explicit `select` replaces that set rather than extending it, so this project was silently opting out of every default rule it did not name. `extend-select` layers the project's own linters on top of the default set instead of in place of it. what: - Replace `select` with `extend-select`, same entries, one per line - Note in the file why `select` stays unset Enabled rules go from 351 to 565. https://docs.astral.sh/ruff/linter/#rule-selection
why: `__init__` returns `None` by contract, so returning the result of `super().__init__()` returns nothing meaningful and misleads a reader into thinking the constructor produces a value. what: - Call `super().__init__()` as a statement in the three exception classes that returned it https://docs.astral.sh/ruff/rules/return-in-init/
why: conf.py reads `__title__`, `__version__`, and the project URLs by exec'ing `src/gp_libs.py` into a dict. That is the Sphinx idiom for reading package metadata without importing the package, and it keeps a docs build from pulling in gp-libs' runtime dependencies. The input is a file in this repository, not untrusted data. what: - Scope an S102 per-file-ignore to `docs/conf.py` https://docs.astral.sh/ruff/rules/exec-builtin/
why: The rule set contributors lint against changed, so it belongs in the unreleased entry rather than only in the diff. what: - Add a `### Development` deliverable for the default rule set https://docs.astral.sh/ruff/linter/#rule-selection
why: Dropping the stray `return` from these constructors made their bodies patch lines, and neither was exercised by a test, so the patch coverage gate went red. The tests also pin the behaviour the PLE0101 change had to preserve: the message each exception carries. what: - Assert the message of `DocTestFinderNameDoesNotExist`, including the interpolated type of the offending object - Assert the message of `TestDocutilsPackageRelativeError`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ruff>=0.16.0floor in thedevandlintdependency groups so contributors and CI see the same diagnostics instead of splitting on whatever ruff each machine resolved.uv.lockonto ruff 0.16.0.AGENTS.mdandREADME.md— 0.16.0 formats Python and pycon code blocks inside Markdown by default, soruff format --checknow reaches documentation it previously ignored.[tool.ruff.lint] selectreplaces the default set rather than extending it, so this project was silently opting out of every default rule its list did not name. Renaming the key toextend-selectlayers the project's linters on top of the defaults instead of in place of them. Enabled rules go from 351 to 565.Changes
pyproject.toml —
ruffbecomesruff>=0.16.0in both thedevandlintgroups.[tool.ruff.lint] selectbecomesextend-select, with the same entries, one per line, each carrying the name of the linter it selects, and a comment recording whyselectstays unset.uv.lock — relocked, ruff 0.15.22 to 0.16.0.
AGENTS.md, README.md —
ruff formatnormalized the quotes in theconf.pyexample forlinkify_issues.CLAUDE.mdis a symlink toAGENTS.md, so it follows.src/doctest_docutils.py, tests/test_doctest_docutils.py —
return-in-init(PLE0101). Three exception classes ended their constructor withreturn super().__init__(...).__init__returnsNoneby contract, so thereturncarried no value and no control flow; it is now a plain statement.CHANGES — development entries recording the ruff floor, why Markdown snippets are now in scope for
ruff format, and the default rule set adoption.Ignores added
exec-builtin(S102), scoped todocs/conf.py. The Sphinx config reads__title__,__version__, and the project URLs by exec'ingsrc/gp_libs.pyinto a dict — the standard idiom for reading package metadata without importing the package, which keeps a docs build from pulling in gp-libs' runtime dependencies. The input is a file in this repository, not untrusted data. The ignore is per-file rather than global soexecanywhere else still trips the rule.Design decisions
The config change lands by itself, before any fix or ignore, so the rule-set delta is reviewable independently of the code it turned up. Each fix and each ignore is then its own commit carrying the rule's documentation link.
The Markdown reformat is likewise its own commit so a reviewer can confirm at a glance that the documentation churn is ruff's quote normalization and nothing else.
selectcannot name the default set — ruff's selector syntax has no token for it — so leavingselectunset and layering withextend-selectis the only way to get defaults-plus-extras. Expanding to whole linter prefixes instead was considered and rejected: it drags in all ofD,PL,S, and friends rather than the curated subset ruff recommends.Test plan
uv run ruff check .— all checks passeduv run ruff format . --check— all files already formatteduv run mypy .— no issues founduv run py.test— full suite green, including the doctests collected fromdocs/andsrc/codecov/patchreports 0% of the diff hit. The only executable lines this branch touches are the three exception constructors, and those constructor bodies were already outside coverage — project coverage is unchanged at 76.32% (+0.00%). The rule fix neither adds nor removes covered lines; earlier commits on this branch touched no Python source at all, which is why the check was previously reported as "coverage not affected".