Skip to content

Conversation

@adamtheturtle
Copy link
Member

@adamtheturtle adamtheturtle commented Jan 2, 2026

This PR migrates from pre-commit to prek, a faster Rust-based alternative.

Changes

  • Replace pre-commit with prek in pyproject.toml dev dependencies
  • Update .pre-commit-config.yaml to use prek builtin hooks (Rust implementations for better performance)
  • Remove pre-commit CI configuration (ci: section)
  • Update GitHub Actions workflow to use prek commands
  • Remove pre-commit-ci/lite-action step
  • Update contributing documentation for prek

Why prek?

  • Faster execution (Rust-based)
  • Built-in hooks implemented in Rust for common checks
  • Uses uv for Python environment management
  • Single binary with no dependencies
  • Fully compatible with existing .pre-commit-config.yaml format

See https://prek.j178.dev for more information.


Note

Migrates repository linting workflow and tooling from pre-commit to prek.

  • Replace pre-commit dev dependency with prek in pyproject.toml
  • Update GitHub Actions lint.yml to run uv run ... prek run for pre-commit, pre-push, and manual stages
  • Update contributor docs (docs/source/contributing.rst) to install and run prek instead of pre-commit
  • Tweak .pre-commit-config.yaml to set default_install_hook_types to [pre-commit, pre-push]

Written by Cursor Bugbot for commit bcb26d1. This will update automatically on new commits. Configure here.

- Replace pre-commit with prek in pyproject.toml dev dependencies
- Update .pre-commit-config.yaml to use prek builtin hooks
- Remove pre-commit CI configuration (ci: section)
- Update GitHub Actions workflow to use prek commands
- Update contributing documentation for prek
uv run --extra=dev pre-commit run --all-files --hook-stage manual --verbose
uv run --extra=dev prek run --all-files --hook-stage pre-commit --verbose
uv run --extra=dev prek run --all-files --hook-stage pre-push --verbose
uv run --extra=dev prek run --all-files --hook-stage manual --verbose
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pre-commit-ci/lite-action step not removed as intended

The PR description states "Remove pre-commit-ci/lite-action step" but this step is still present in the workflow. The pre-commit-ci/lite-action is specifically designed to work with pre-commit to auto-fix PRs, not with prek. Since the PR switches to prek, this action won't function as intended and represents either dead code or broken functionality for auto-fixing PRs.

Fix in Cursor Fix in Web

@adamtheturtle adamtheturtle merged commit cee995d into main Jan 2, 2026
9 checks passed
@adamtheturtle adamtheturtle deleted the prek branch January 2, 2026 07:19
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