Skip to content

chore: pin typos as a local hook so autoupdate can't unpin it#6075

Merged
max-sixty merged 1 commit into
PRQL:mainfrom
max-sixty:fix-pre-commit
Jul 11, 2026
Merged

chore: pin typos as a local hook so autoupdate can't unpin it#6075
max-sixty merged 1 commit into
PRQL:mainfrom
max-sixty:fix-pre-commit

Conversation

@max-sixty

Copy link
Copy Markdown
Member

Follow-up to #6074, fixing the last unpinned hook. The typos rev has been the mutable v1 tag, which pre-commit never updates after first install — so every machine and CI environment silently freezes whatever version it first built, and versions drift apart over time.

Pinning an exact tag doesn't stick: crate-ci/typos publishes moving tags (v1, typos-dict-*) on the same repo, and pre-commit autoupdate re-selects among them — #5481 pinned v1.9.0 and #5510 pinned v1.37.2, and the next weekly autoupdate reverted each back to v1 (one week it even landed on typos-dict-v0.13.13). This converts typos to a repo: local hook with the version pinned via additional_dependencies: ["typos==1.48.0"] (PyPI binary wheels), the same pattern the config already uses for lychee. Local hooks have no rev, so autoupdate has nothing to rewrite. The hook definition mirrors upstream's exactly (entry: typos, args: [--write-changes, --force-exclude], types: [text]) and keeps the existing pass_filenames: false workaround for crate-ci/typos#347.

Trade-off: typos bumps become manual (autoupdate and dependabot don't track additional_dependencies), which beats an unpinned version frozen per-machine. typos 1.48.0 runs clean across the repo — no new dictionary findings — and pre-commit run --all-files passes with the mutable-reference warning gone.

This was written by Claude Code on behalf of max

crate-ci/typos publishes moving tags (v1, typos-dict-*), so autoupdate
rewrites any pinned rev back to a mutable reference (PRQL#5481, PRQL#5510).
A local hook has no rev; the version pin in additional_dependencies
sticks, matching the existing lychee pattern.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@max-sixty max-sixty merged commit 5ec8049 into PRQL:main Jul 11, 2026
35 checks passed
@max-sixty max-sixty deleted the fix-pre-commit branch July 11, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants