From 988199c40a63097d6f69a5d82ba61fcb9c68ddab Mon Sep 17 00:00:00 2001 From: Maximilian Roos Date: Sat, 11 Jul 2026 02:27:57 -0700 Subject: [PATCH] chore: pin typos as a local hook so autoupdate can't unpin it crate-ci/typos publishes moving tags (v1, typos-dict-*), so autoupdate rewrites any pinned rev back to a mutable reference (#5481, #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 --- .pre-commit-config.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ea15529e7681..72c76171818f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,10 +9,19 @@ repos: - id: trailing-whitespace # rustfmt handles rust files, and in some snapshots we expect trailing spaces. exclude: '.*\.(rs|snap)$' - - repo: https://github.com/crate-ci/typos - rev: v1 + # A local hook rather than the crate-ci/typos repo hook: that repo's moving + # tags (`v1`, `typos-dict-*`) make autoupdate rewrite any pinned rev back to + # a mutable reference (#5481 and #5510 both pinned; the next autoupdate + # reverted each). A local hook has no rev, so the pin below sticks. + - repo: local hooks: - id: typos + name: typos + language: python + additional_dependencies: ["typos==1.48.0"] + entry: typos + args: [--write-changes, --force-exclude] + types: [text] # https://github.com/crate-ci/typos/issues/347 pass_filenames: false - repo: https://github.com/rbubley/mirrors-prettier