Skip to content

Commit 0dc9e3d

Browse files
sarahmonodgodlygeek
authored andcommitted
Replace pre-commit with prek
`prek` is a drop-in replacement that has fewer bugs, runs faster and has a more active community than `pre-commit`. Signed-off-by: Sarah Monod <smonod1@bloomberg.net>
1 parent 66bc46c commit 0dc9e3d

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

.github/workflows/lint_and_docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Lint sources
2424
run: |
2525
make lint PYTHON=python3
26-
python3 -m pre_commit run --all-files --hook-stage pre-push
26+
python3 -m prek run --all-files --hook-stage pre-push
2727
- name: Build docs
2828
run: |
2929
towncrier build --version 99.99 --name pystack --keep

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ easier to validate it.
6161

6262
### Linting your code
6363

64-
Before commiting anything, install the pre-commit hooks:
64+
Before commiting anything, install the prek (pre-commit) hooks:
6565

6666
```shell
6767
python3 -m pip install -r requirements-extra.txt
68-
pre-commit install
68+
prek install
6969
```
7070

7171
This will ensure that your contribution passes our linting checks.

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ ccoverage: ## Run the test suite, with C++ code coverage
7979

8080
.PHONY: format
8181
format: ## Autoformat all files
82-
$(PYTHON) -m pre_commit run --all-files
82+
$(PYTHON) -m prek run --all-files
8383

8484
.PHONY: lint
8585
lint: ## Lint all files
86-
$(PYTHON) -m pre_commit run --all-files
86+
$(PYTHON) -m prek run --all-files
8787
$(PYTHON) -m mypy src/pystack --strict --ignore-missing-imports
8888
$(PYTHON) -m mypy tests --ignore-missing-imports
8989

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ This will install PyStack in the virtual environment in development mode (the `-
9292
`pip install` command), and then install the Python libraries needed to test it, lint it, and
9393
generate its documentation.
9494

95-
If you plan to contribute back, you should install the pre-commit hooks:
95+
If you plan to contribute back, you should install the prek (pre-commit) hooks:
9696

9797
```shell
98-
pre-commit install
98+
prek install
9999
```
100100

101101
This will ensure that your contribution passes our linting checks.

requirements-extra.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
mypy
22
bump2version
33
towncrier
4-
pre-commit
4+
prek
55
-r requirements-docs.txt

0 commit comments

Comments
 (0)