Skip to content

Commit 3a2d032

Browse files
Dev-iLclaude
andcommitted
Update pre-commit hook configs for prek migration
Root: - Bump pre-commit-hooks v5→v6, mirrors-mypy v1.5.1→v2.1.0, ruff-pre-commit v0.8.1→v0.15.13 - Replace the single `ruff` hook (pass_filenames: false, always_run) with the canonical `ruff-check` + `ruff-format` split; the new hooks are file-aware and don't need always_run - Add args: ["python"] to the mypy hook so it has a target when pass_filenames: false psqlpy-stress: - Add orphan: true so prek treats this as an independent config - Replace local poetry-based ruff/mypy invocations with standard mirror hooks (mirrors-mypy + ruff-pre-commit), consistent with the root config - Add pass_filenames: false + args: ["psqlpy_stress"] to mypy Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 5d91da2 commit 3a2d032

2 files changed

Lines changed: 25 additions & 25 deletions

File tree

.pre-commit-config.yaml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,25 @@ ci:
33

44
repos:
55
- repo: https://github.com/pre-commit/pre-commit-hooks
6-
rev: v5.0.0
6+
rev: v6.0.0
77
hooks:
88
- id: trailing-whitespace
99
- repo: https://github.com/pre-commit/mirrors-mypy
10-
rev: v1.5.1
10+
rev: v2.1.0
1111
hooks:
1212
- id: mypy
1313
name: python mypy
1414
always_run: true
1515
pass_filenames: false
1616
args: ["python"]
1717
- repo: https://github.com/astral-sh/ruff-pre-commit
18-
rev: v0.8.1
18+
rev: v0.15.13
1919
hooks:
20-
- id: ruff
21-
name: ruff
22-
pass_filenames: false
23-
always_run: true
24-
args: ["python", "--fix"]
20+
# Run the linter.
21+
- id: ruff-check
22+
args: [ --fix ]
23+
# Run the formatter.
2524
- id: ruff-format
26-
name: ruff
27-
pass_filenames: false
28-
always_run: true
29-
args: ["python"]
3025
- repo: local
3126
hooks:
3227
- id: fmt
Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,34 @@
11
# See https://pre-commit.com for more information
22
# See https://pre-commit.com/hooks.html for more hooks
3+
orphan: true
34
repos:
45
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v2.4.0
6+
rev: v6.0.0
67
hooks:
78
- id: check-ast
89
- id: trailing-whitespace
910
- id: check-toml
1011
- id: end-of-file-fixer
1112

1213
- repo: https://github.com/asottile/add-trailing-comma
13-
rev: v2.1.0
14+
rev: v4.0.0
1415
hooks:
1516
- id: add-trailing-comma
1617

17-
- repo: local
18+
- repo: https://github.com/pre-commit/mirrors-mypy
19+
rev: v2.1.0
1820
hooks:
19-
- id: ruff
20-
name: Check with ruff
21-
entry: poetry run ruff check --force-exclude
22-
language: system
23-
types: [python]
24-
2521
- id: mypy
26-
name: Validate types with MyPy
27-
entry: poetry run mypy
28-
language: system
29-
types: [python]
22+
name: python mypy
23+
always_run: true
24+
pass_filenames: false
25+
args: ["psqlpy_stress"]
26+
27+
- repo: https://github.com/astral-sh/ruff-pre-commit
28+
rev: v0.15.13
29+
hooks:
30+
# Run the linter.
31+
- id: ruff-check
32+
args: [ --fix ]
33+
# Run the formatter.
34+
- id: ruff-format

0 commit comments

Comments
 (0)