Skip to content

Commit cc069ee

Browse files
committed
Use prek for pre-commit functionality
1 parent 6305b31 commit cc069ee

File tree

5 files changed

+12
-14
lines changed

5 files changed

+12
-14
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
pip install -U -e .[develop]
4141
pip install -U coveralls
4242
- name: Run style-checks
43-
uses: pre-commit/action@v3.0.1
43+
uses: j178/prek-action@v1
4444
- name: Run test suite
4545
run: |
4646
coverage erase

.pre-commit-config.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
repos:
2-
# - repo: https://github.com/pre-commit/pre-commit-hooks
3-
# rev: v2.1.0
4-
# hooks:
5-
# - id: trailing-whitespace
6-
# - id: end-of-file-fixer
2+
- repo: builtin
3+
hooks:
4+
- id: trailing-whitespace
5+
- id: end-of-file-fixer
6+
- id: check-yaml
7+
- id: check-toml
78
- repo: local
89
hooks:
910
- id: black

Makefile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ all:
55

66
install:
77
python -m pip install -U -e .[develop]
8-
pre-commit install
8+
prek install --overwrite
99
gitlint install-hook
1010

1111
test:
@@ -21,12 +21,9 @@ coverage:
2121
coverage html
2222

2323
lint:
24-
pre-commit run --all-files flake8
24+
prek run --all-files flake8
2525

2626
format:
27-
pre-commit run --all-files black
28-
pre-commit run --all-files isort
29-
pre-commit run --all-files end-of-file-fixer
30-
pre-commit run --all-files trailing-whitespace
27+
prek run --all-files black isort end-of-file-fixer trailing-whitespace
3128

3229
style-check: format lint

examples/quickstart.svg

Lines changed: 1 addition & 1 deletion
Loading

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ develop = [
5252
"flake8-pyproject==1.2.4",
5353
"gitlint-core==0.19.1",
5454
'isort==7.0.0',
55-
'pre-commit==4.5.1',
55+
'prek==0.3.1',
5656
]
5757
packaging = [
5858
"build",

0 commit comments

Comments
 (0)