Repository navigation
build: Modernize lint and CI tooling - #210
Merged
Merged
Conversation
Replace the Python lint hooks with ruff, move the generic hooks to prek builtins, port bump-version.sh to POSIX sh with a shellcheck hook, bump uv to 0.13.8, and bump and fully pin the GitHub Actions.
joshuarli
approved these changes
Nov 13, 2026
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.
Builds on #209 (pre-commit → prek).
ruff-check --fixandruff-format) replaces reorder-python-imports, add-trailing-comma, pyupgrade, autopep8 and flake8. Thepyproject.tomlconfig keeps the current style: single quotes, force-single-line imports sorted case-insensitively, the requiredfrom __future__ import annotations, 120-column lines, andUP,T10(instead ofdebug-statements) andQ(instead ofdouble-quote-string-fixer).target-version = "py311"matches both packages'requires-python = ">=3.11". The old--py312-pluscould have produced syntax that breaks on 3.11..flake8is gone. The Python changes are ruff's autofixes and formatting.builtinrepo with the same excludes and args. prek has noname-tests-test, so that hook stays onpre-commit-hooksv6.0.0.scripts/bump-version.shis now POSIXsh, and craft calls it withsh. It still takes craft's old and new versions as$1/$2. perl now reads the version from an env var instead of having it pasted into its code. A new shellcheck hook runs with--shell=sh --enable=check-extra-masked-returns. It skips.envrc, which direnv runs with bash.devenv/config.ini(sha256 values from the release's.sha256files) and in thesetup-uvsteps.actions/checkoutis now v7.0.1 everywhere (it was a mix of v3, v4 and v5).astral-sh/setup-uvis v10.3.3 anddorny/paths-filteris v4.0.2. Every action is pinned by SHA with an exact# vX.Y.Zcomment. The upstream breaking changes (node24, setup-uv cache defaults, checkout v7 refusing fork checkouts onpull_request_target/workflow_run) don't affect these workflows.Open questions:
COMrules are not enabled, becauseCOM812conflicts with ruff-format. ruff-format also doesn't hug a lone dict argument likejson.dumps({...})(that's preview-only), which causes most of the churn intests/gen_stubs_test.py.sentry-options/sentry_options/__init__.pyi, since the gen-stubs hook owns it and the two would fight. It also skips*.mdso docs code samples stay as written. The old hooks touched neither.v0.11.0.1-1, its newest tag. It has the same shellcheck 0.11.0 asv0.11.0.1.dorny/paths-filterv4.0.3 exists and has a security fix forlist-filesshell/csv output. We only usejson, so this stays on v4.0.2. Bump it if you'd rather be on latest.release.ymljumps checkout from v3 to v7. PR CI doesn't run that workflow, so the next release is its first real test.via @joshuarli.
--
View Session [Sentry]