Skip to content

Commit 4724de3

Browse files
authored
chore(dev): replace pre-commit with prek (#819)
Replaces `pre-commit` with [prek](https://github.com/j178/prek) as the dev hook runner.
1 parent 42f7cef commit 4724de3

4 files changed

Lines changed: 22 additions & 92 deletions

File tree

‎.pre-commit-config.yaml‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
# However, pre-commit requires this file to be placed at the root of the repository.
33

44
repos:
5-
- repo: https://github.com/pre-commit/pre-commit-hooks
6-
rev: v6.0.0
5+
- repo: builtin
76
hooks:
87
- id: trailing-whitespace
98
- id: end-of-file-fixer

‎clients/python/README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,11 +268,11 @@ The considerations for setting up the development environment that can be found
268268

269269
### Pre-commit hook
270270

271-
A configuration to set up a git pre-commit hook using [pre-commit](https://github.com/pre-commit/pre-commit) is available at the root of the repository.
271+
A configuration to set up a git pre-commit hook using [prek](https://prek.j178.dev/) is available at the root of the repository.
272272

273273
To install it, run
274274
```sh
275-
pre-commit install
275+
prek install
276276
```
277277

278278
The hook will automatically run some checks before every commit, including the linters and formatters we run in CI.

‎pyproject.toml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ requires-python = ">=3.11"
66
[tool.uv]
77
required-version = ">=0.9.18"
88

9+
[tool.uv.sources]
10+
prek = { index = "sfw" }
11+
912
[[tool.uv.index]]
1013
name = "sentry-pypi"
1114
url = "https://pypi.devinfra.sentry.io/simple"
@@ -30,7 +33,7 @@ dev = [
3033
"pytest-cov>=4.1.0",
3134
"mypy>=1.17.1",
3235
"ruff>=0.14.2",
33-
"pre-commit>=4.2.0",
36+
"prek>=0.5.10",
3437
]
3538
docs = [
3639
"sphinx>=8.1.3",

‎uv.lock‎

Lines changed: 15 additions & 87 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)