Skip to content

Commit 942958f

Browse files
authored
Merge pull request #561 from jakob-keller/prek
Migrate from pre-commit to prek
2 parents d0d5e5c + a6e22fb commit 942958f

File tree

5 files changed

+44
-165
lines changed

5 files changed

+44
-165
lines changed

.pre-commit-config.yaml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,43 @@ default_install_hook_types:
22
- commit-msg
33
- pre-commit
44
repos:
5-
- repo: https://github.com/pre-commit/pre-commit-hooks
6-
rev: v6.0.0
5+
- repo: builtin
76
hooks:
87
- id: check-added-large-files
98
args: [--enforce-all]
10-
- id: check-ast
11-
- id: check-builtin-literals
129
- id: check-case-conflict
13-
- id: check-docstring-first
1410
- id: check-executables-have-shebangs
15-
- id: check-illegal-windows-names
1611
- id: check-json
1712
- id: check-merge-conflict
18-
- id: check-shebang-scripts-are-executable
1913
- id: check-symlinks
2014
- id: check-toml
21-
- id: check-vcs-permalinks
2215
- id: check-xml
2316
- id: check-yaml
17+
- id: detect-private-key
18+
- id: fix-byte-order-marker
19+
- id: mixed-line-ending
20+
args: [--fix=no]
21+
- id: no-commit-to-branch
22+
- id: trailing-whitespace
23+
- repo: https://github.com/pre-commit/pre-commit-hooks
24+
rev: v6.0.0
25+
hooks:
26+
- id: check-ast
27+
- id: check-builtin-literals
28+
- id: check-docstring-first
29+
- id: check-illegal-windows-names
30+
- id: check-shebang-scripts-are-executable
31+
- id: check-vcs-permalinks
2432
- id: debug-statements
2533
- id: destroyed-symlinks
2634
- id: detect-aws-credentials
2735
args: [--allow-missing-credentials]
28-
- id: detect-private-key
29-
- id: fix-byte-order-marker
3036
- id: forbid-new-submodules
3137
- id: forbid-submodules
32-
- id: mixed-line-ending
33-
args: [--fix=no]
3438
- id: name-tests-test
3539
args: [--pytest-test-first]
36-
- id: no-commit-to-branch
3740
- id: pretty-format-json
3841
- id: requirements-txt-fixer
39-
- id: trailing-whitespace
4042
- repo: https://github.com/astral-sh/uv-pre-commit
4143
rev: 0.9.17
4244
hooks:

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ UV_NO_PROGRESS = 1
33
environment:
44
uv sync --frozen
55
@echo
6-
uv run pre-commit install
6+
uv run prek install
77

88
bump_dependencies:
9-
uv run pre-commit autoupdate --jobs 10
9+
uv run prek auto-update --no-progress
1010
@echo
1111
uv sync --upgrade
1212
uv pip list --outdated --strict
1313

1414
check:
15-
uv run pre-commit run --all-files
15+
uv run prek run --all-files --no-progress
1616
@echo
1717
uv run pytest

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Foundational Python library
33

44
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/peprock)
5-
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
5+
[![prek](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/j178/prek/master/docs/assets/badge-v0.json)](https://github.com/j178/prek)
66
[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
77
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
88
[![codecov](https://codecov.io/gh/Ponte-Energy-Partners/peprock/branch/main/graph/badge.svg?token=LWI96U2WSI)](https://codecov.io/gh/Ponte-Energy-Partners/peprock)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ dependencies = [
4545
dev = [
4646
"coverage[toml] >=7.2.1,<8.0.0",
4747
"mypy >=1.15.0,<2.0.0",
48-
"pre-commit >=4.0.1,<5.0.0",
48+
"prek >=0.2.23,<0.3.0",
4949
"pdoc3 >=0.11.1,<0.12.0",
5050
"pytest >=9.0.2,<10.0.0",
5151
"pytest-cov >=6.0.0,<8.0.0",

0 commit comments

Comments
 (0)