chore: bump CI actions and dependencies, widen ruff rule set, drop bandit - #128
Merged
Conversation
smarlhens
force-pushed
the
worktree-bump-ci-and-deps
branch
from
July 27, 2026 13:06
4fcfb76 to
8ee802a
Compare
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
94574e9actions/setup-pythonv6 → v7,astral-sh/setup-uvv8.2.0 → v9.0.06b13bbfuv lock --upgrade00e6cbaextend-selectagainst ruff v0.16 defaults, widen rule set8ee802aSruleset1. GitHub Actions
actions/setup-python v7.0.0
@actions/cache6.2.0)pip-installinput — not used here, no impactastral-sh/setup-uv v9.0.0
prune-cachedefault changed tofalse(Changeprune-cachedefault tofalseastral-sh/setup-uv#967) to reduce load on PyPI infrastructure. This can increase GitHub Actions cache usage.Both jobs already run an explicit
uv cache prune --cistep before the cache-save post step, so effective pruning behaviour is unchanged.os-releasehas no version field2. Hooks and dependencies
ruff v0.15.20 → v0.16.0, mypy v2.1.0 → v2.3.0, ty v0.0.55 → v0.0.63, oxfmt v0.56.0 → v0.60.0, with matching floors in
[dependency-groups] dev.ruff v0.16.0 breaking changes
[tool.ruff.lint]usesextend-select, the effective rule set silently widened fromE4,E7,E9,F+ our curated list to all 413 defaults + our curated list. Addressed in commit 3.ruff formatnow formats Python code blocks in Markdown. Inert here: CI formats onlysrc tests, theruff-formathook is scoped totypes_or: [python, pyi, jupyter], andREADME.mdhas nopythonfences. Opt out withextend-exclude = ["*.md"]if that changes.# ruff: ignore[RULE]/# ruff: file-ignore[RULE]suppression comments alongsidenoqaformat --checkgained the linter output formats (github,gitlab, …) and now shows the difffilename/location/end_locationmay now benull3. Ruff rule set: dedupe + widen
Each selector was expanded in isolation via
ruff check --isolated --config 'lint.select=[…]' --show-settingsand compared against the 413-rule default set.Removed as redundant — every rule they select is now on by default:
Collapsed into wider selectors (a widening, not a removal):
N805NPLC,PLRPLPLE(8), +PLW(8)RET502–RET505RETNewly enabled:
A,ANN401,ARG,B,D417,EM,ERA001,FBT,G,ISC003,LOG,PERF403,PGH003,PT,PTH,RSE102,RUF005,RUF006,RUF021,RUF036,SIM,SLF001,SLOT,TC,TID252,TRY300,TRY301,TRY400.Deliberately excluded:
COM812/ISC001/Q(conflict with the formatter),D203/D212(mutually exclusive with the configuredD211/D213),TD/FIX,C901(needs a threshold;PLR0912covers it), and the framework rulesets (AIR,DJ,PD,NPY,FAST).Net: 59 → 64 selectors, 494 → 639 rules enabled, zero rules lost.
tests/test_python_boilerplate.pynow usesassertinstead ofraise ValueError(...).EM101flagged the string literal in the raise;assertis the idiomatic pytest form andS101is already inper-file-ignoresfor tests.4. Bandit parity
Enumerated bandit 1.9.4's registry (75 test ids across plugins and blacklists) against ruff's 73
flake8-banditrules. Numeric ids map 1:1 (S608↔B608).S401–S415, the import blacklists) and so inert withoutpreview = trueS320,S410, bothRemovedstatusB613,B614,B615,B703Two of those four are covered under different ids:
B703(djangomark_safe) byS308, andB613(trojansource) byPLE2502bidirectional-unicode, now enabled viaPL.Effective coverage: 58/75, confirmed against
--show-settings(58Srules enabled, 693 rules total). Remaining gaps areB614(torch.load) andB615(unsafe HuggingFace download) — no ML dependencies in this template — plus the 13 preview-gated import blacklists.Given that, bandit is replaced by
S: one fewer dev dependency (and 4 transitives:pbr,pyyaml,rich,stevedore), one fewer pre-commit hook, one fewer CI step.Salso coverstests/, which the bandit hook excluded viaexclude: ^tests/.Verification
pre-commit run --all-filespasses locally at every commit; CI green on all four.