-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
.pre-commit-config.yaml
95 lines (86 loc) · 2.6 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
ci:
autofix_commit_msg: '[pre-commit.ci] auto fixes'
autofix_prs: true
skip:
- pip-compile
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-json
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
exclude: \.changes/.*\.md
- id: no-commit-to-branch
args: [--branch, main]
- id: trailing-whitespace
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.30.0
hooks:
- id: check-dependabot
- id: check-github-workflows
- id: check-readthedocs
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.4
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
- id: ruff-format
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
exclude: |
(?x)^(
uv\.lock|
requirements/requirements.*\.txt
)$
additional_dependencies:
- tomli
- repo: https://github.com/pre-commit/pre-commit
rev: v4.0.1
hooks:
- id: validate_manifest
- repo: https://github.com/hadialqattan/pycln
rev: v2.4.0
hooks:
- id: pycln
args: [--all]
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "v2.5.0"
hooks:
- id: pyproject-fmt
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.5.12
hooks:
- id: uv-export
name: Export Docs Dependencies
files: ^uv\.lock$
args: ["--frozen", "--no-editable", "--output-file=requirements/requirements-docs.txt", "--only-group=docs"]
- id: uv-export
name: Export Test Dependencies
files: ^uv\.lock$
args: ["--frozen", "--output-file=requirements/requirements-test.txt", "--no-dev", "--only-group=test"]
- id: uv-export
name: Export Typing Dependencies
files: ^uv\.lock$
args: ["--frozen", "--output-file=requirements/requirements-typing.txt", "--only-group=typing"]
- id: uv-export
name: Export Runtime Dependencies
files: ^uv\.lock$
args: ["--frozen", "--output-file=requirements/requirements-highest.txt", "--no-dev", "--no-hashes", "--no-emit-project"]
- id: pip-compile
name: pip-compile Lowest Direct
files: ^pyproject\.toml$
args: ["pyproject.toml", "--universal", "--resolution=lowest-direct", "-o=requirements/requirements-lowest-direct.txt"]
- id: pip-compile
name: pip-compile CI Dependencies
files: ^requirements/requirements-ci\.in$
args: ["requirements/requirements-ci.in", "--universal", "-o=requirements/requirements-ci.txt"]
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.21
hooks:
- id: mdformat
exclude: \.github/pull_request_template\.md