Skip to content

chore(dev): replace pre-commit with prek - #875

Merged
joshuarli merged 1 commit into
mainfrom
refactor/replace-pre-commit-with-prek
Nov 30, 2026
Merged

joshuarli merged 1 commit into
mainfrom
refactor/replace-pre-commit-with-prek

Conversation

@joshuarli

Copy link
Copy Markdown
Member

Replaces pre-commit with prek as the dev hook runner.

pre-commit was the only reason virtualenv was in uv.lock; removing it drops virtualenv and its transitive dependencies from the lock. All three project pyprojects (root, integration tests, Python client) switch to prek; the pre-commit-hooks block moves to builtin, and hook installation, CI commands and the prek cache path are updated. Because this repo uses an explicit sfw index, prek = { index = "sfw" } is added under [tool.uv.sources] so 0.5.x resolves instead of the older version on the default index.

Verified: uv lock --check, prek validate-config .pre-commit-config.yaml, and prek run --all-files — all 13 hooks pass.

Refs DI-2952.

pre-commit pulls virtualenv and its command-injection advisories into the dev lock. prek is pre-commit-compatible and manages hook environments with uv, so virtualenv and its transitive dependencies drop out entirely.
@joshuarli
joshuarli requested a review from a team as a code owner November 23, 2026 18:04
@linear-code

linear-code Bot commented Nov 23, 2026

Copy link
Copy Markdown

DI-2952

@joshuarli
joshuarli merged commit 024faab into main Nov 30, 2026
30 checks passed
@joshuarli
joshuarli deleted the refactor/replace-pre-commit-with-prek branch November 30, 2026 18:07
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