Skip to content

Commit 8839ba6

Browse files
Refactor pre-commit configuration for Python hooks
1 parent 8903feb commit 8839ba6

1 file changed

Lines changed: 42 additions & 32 deletions

File tree

.pre-commit-config.yaml

Lines changed: 42 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,67 @@
11
repos:
2-
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.5.0
4-
hooks:
5-
- id: trailing-whitespace
6-
- id: end-of-file-fixer
7-
- id: check-yaml
8-
- id: check-added-large-files
9-
- id: check-merge-conflict
10-
11-
- repo: https://github.com/psf/black
12-
rev: 23.12.1
2+
- repo: local
133
hooks:
144
- id: black
5+
name: black
6+
entry: uv run black
7+
language: system
8+
require_serial: true
9+
types: [python]
1510
args: [--config=pyproject.toml]
1611

17-
- repo: https://github.com/pycqa/isort
18-
rev: 5.13.2
19-
hooks:
2012
- id: isort
13+
name: isort
14+
entry: uv run isort
15+
language: system
16+
types: [python]
2117
args: [--settings-path=pyproject.toml]
18+
pass_filenames: false
2219

23-
- repo: https://github.com/pycqa/flake8
24-
rev: 7.0.0
25-
hooks:
2620
- id: flake8
21+
name: flake8
22+
entry: uv run flake8
23+
language: system
24+
types: [python]
2725
args: [--config=.dev-config/.flake8]
28-
additional_dependencies: [flake8-docstrings]
26+
pass_filenames: false
2927

30-
- repo: https://github.com/pycqa/pydocstyle
31-
rev: 6.3.0
32-
hooks:
3328
- id: pydocstyle
29+
name: pydocstyle
30+
entry: uv run pydocstyle
31+
language: system
32+
types: [python]
3433
args: [--config=.dev-config/.pydocstyle]
34+
pass_filenames: false
3535

36-
- repo: https://github.com/pre-commit/mirrors-mypy
37-
rev: v1.8.0
38-
hooks:
3936
- id: mypy
40-
args: [--config-file=.dev-config/mypy.ini]
41-
additional_dependencies: [types-all]
37+
name: mypy
38+
entry: uv run mypy
39+
language: system
40+
types: [python]
41+
args: [--config-file=.dev-config/mypy.ini, .]
42+
pass_filenames: false
4243

43-
- repo: https://github.com/pycqa/pylint
44-
rev: v3.0.3
45-
hooks:
4644
- id: pylint
45+
name: pylint
46+
entry: uv run pylint
47+
language: system
48+
types: [python]
4749
args: [--rcfile=.dev-config/.pylintrc]
50+
pass_filenames: false
4851

49-
- repo: local
50-
hooks:
5152
- id: pytest
5253
name: pytest
53-
entry: pytest
54+
entry: uv run pytest
5455
language: system
5556
pass_filenames: false
5657
always_run: true
5758
args: [tests/]
59+
60+
- repo: https://github.com/pre-commit/pre-commit-hooks
61+
rev: v4.5.0
62+
hooks:
63+
- id: trailing-whitespace
64+
- id: end-of-file-fixer
65+
- id: check-yaml
66+
- id: check-added-large-files
67+
- id: check-merge-conflict

0 commit comments

Comments
 (0)