Replace pre-commit with prek for improved linting performance - #110
Merged
Conversation
Co-authored-by: nstarman <8949649+nstarman@users.noreply.github.com>
Co-authored-by: nstarman <8949649+nstarman@users.noreply.github.com>
…nstall docs Co-authored-by: nstarman <8949649+nstarman@users.noreply.github.com>
Copilot
AI
changed the title
Switch from pre-commit to prek
Replace pre-commit with prek for improved linting performance
Aug 23, 2026
Copilot created this pull request from a session on behalf of
nstarman
August 23, 2026 02:21
View session
nstarman
requested changes
Aug 23, 2026
Co-authored-by: Nathaniel Starkman <nstarman@users.noreply.github.com> Signed-off-by: Nathaniel Starkman <nstarman@users.noreply.github.com>
nstarman
reviewed
Sep 1, 2026
Signed-off-by: Nathaniel Starkman <nstarman@users.noreply.github.com>
Signed-off-by: Nathaniel Starkman <nstarman@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates the project’s linting hook runner from pre-commit to prek (pre-commit-compatible) to improve hook execution performance while keeping the existing .pre-commit-config.yaml behavior.
Changes:
- Swap the lint dependency from
pre-committoprek(and updateuv.lockaccordingly). - Update Nox to run
prek run --all-filesfor the lint hook runner session. - Update contributor documentation to reference
prekcommands.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| uv.lock | Removes pre-commit and its transitive deps; adds prek package resolution. |
| pyproject.toml | Replaces lint-group dependency pre-commit>=4.5.0 with prek>=0.4.0. |
| noxfile.py | Switches the hook runner invocation to prek run --all-files (but session naming needs alignment). |
| CONTRIBUTING.md | Updates contributor commands to use prek (wording still references “pre-commit hooks”). |
| .github/CONTRIBUTING.md | Updates commands to use prek (section header still says “Pre-commit”). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
68
to
70
| lint = [ | ||
| "pre-commit>=4.5.0", | ||
| "prek>=0.4.0", | ||
| "pylint==4.0.4", |
Collaborator
|
@copilot fix the |
Co-authored-by: nstarman <8949649+nstarman@users.noreply.github.com>
Contributor
Author
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.
Migrate from
pre-committoprek, a performant Rust-based alternative with identical configuration compatibility. This improves hook execution speed while maintaining the exact same linting behavior.Changes
pre-commit>=4.5.0→prek>=0.4.0in pyproject.toml lint groupnoxfile.pyto invokeprek run --all-filesand rename sessionprecommit()→prek_session()pre-commit→prekin workflow; excludeprek-ciin release configNo configuration changes needed—prek accepts
.pre-commit-config.yamlas-is. All existing hooks work without modification.