chore: migrate from pre-commit to prek#66
Merged
eifinger merged 6 commits intoeifinger:mainfrom Jan 31, 2026
Merged
Conversation
Replace pre-commit with prek, a faster Rust-based alternative. Changes: - Replace pre-commit and pre-commit-hooks with prek in pyproject.toml - Update CI workflow to cache prek instead of pre-commit - Update CI command from pre-commit to prek Benefits: - Faster hook execution with Rust-native implementations - Single binary without Python runtime dependency - Drop-in replacement, same hook IDs work
Replace local hooks with builtin hooks that work with prek: - Use repo: builtin instead of repo: local for standard hooks - Update ruff-pre-commit to v0.9.4 - Update shellcheck to v0.10.0 - Remove prettier (not essential) - Remove mypy and pytest from pre-commit (run in CI only) This aligns with fressnapftracker configuration.
Remove hooks not supported by prek's builtin repo: - check-ast - check-docstring-first - debug-statements These hooks require the full pre-commit-hooks package. Keep only hooks supported by prek's builtin implementation: https://prek.j178.dev/builtin/
- Restore mypy as local hook (uses uv run mypy) - Restore yamllint as local hook (uses uv run yamllint) - Restore codespell exclude pattern for .lock and CHANGELOG.md - Keep pytest in CI only (not in pre-commit, as it was slow) Note: check-ast, check-docstring-first, debug-statements removed as they require pre-commit-hooks package which we're replacing.
Add pytest as local hook (uses uv run pytest)
eifinger
approved these changes
Jan 31, 2026
Keep ruff at original version (v0.1.7) to avoid introducing new linting rules that would require code changes. Also restore original hook names with emojis for consistency.
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
Replace pre-commit with prek, a faster Rust-based alternative.
Changes
pre-committoprekBenefits
Reference
Same pattern as fressnapftracker PR #11