-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
193 lines (193 loc) · 5.74 KB
/
.pre-commit-config.yaml
File metadata and controls
193 lines (193 loc) · 5.74 KB
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
minimum_prek_version: 0.2.23
repos:
- repo: https://github.com/tsvikas/sync-with-uv
rev: v0.4.0
hooks:
- id: sync-with-uv
priority: 0
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.10.9
hooks:
- id: uv-sync
priority: 0
- id: uv-export
args: ["--frozen", "--only-group=doc", "--output-file=docs/requirements.txt", "--quiet"]
priority: 0
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
priority: 0
- id: check-case-conflict
priority: 0
- id: check-merge-conflict
priority: 0
- id: check-symlinks
priority: 0
- id: check-yaml
priority: 0
- id: debug-statements
priority: 0
- id: name-tests-test
args: [--pytest-test-first]
priority: 0
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.24.1
hooks:
- id: validate-pyproject
priority: 0
- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.11.1
hooks:
- id: pyproject-fmt
args: [--max-supported-python=3.14]
priority: 0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.3
hooks:
- id: ruff-check
args: [--fix]
priority: 0
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.22.0
hooks:
- id: markdownlint-cli2
args: ["--fix"]
priority: 0
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
additional_dependencies:
- tomli
priority: 0
- repo: local
hooks:
- id: check-skills-documented
name: check-skills-documented
entry: uv run --frozen --offline hooks/check-skills-documented.py
args: ["--prefix=usethis-"]
language: system
always_run: true
pass_filenames: false
priority: 0
- id: check-test-skeleton
name: check-test-skeleton
entry: uv run --frozen --offline hooks/check-test-skeleton.py
args: ["--source-dir", "src", "--tests-dir", "tests/usethis"]
language: system
always_run: true
pass_filenames: false
priority: 0
- id: check-banned-words
name: check-banned-words
entry: uv run --frozen --offline hooks/check-banned-words.py
args: ["--hooks-dir=hooks", "usethis"]
language: system
always_run: true
pass_filenames: false
priority: 0
- id: check-list-referenced
name: check-list-referenced
entry: uv run --frozen --offline hooks/check-list-referenced.py
args:
- "--variable=usethis._ui.interface.tool.ALL_TOOL_COMMAND_STRS"
- "--target-file=README.md"
language: system
always_run: true
pass_filenames: false
priority: 0
- id: check-priority-monotone
name: check-priority-monotone
entry: uv run --frozen --offline hooks/check-priority-monotone.py
args: ["--config-file=.pre-commit-config.yaml"]
language: system
always_run: true
pass_filenames: false
priority: 0
- id: export-skills-directory
name: export-skills-directory
entry: uv run --frozen --offline hooks/export-skills-directory.py
args: ["--skills-dir=.agents/skills", "--output-file=docs/skills-directory.txt", "--prefix=usethis-"]
language: system
always_run: true
pass_filenames: false
priority: 0
- id: export-module-tree
name: export-module-tree
entry: uv run --frozen --offline hooks/export-module-tree.py
args: ["--source-root=src/usethis", "--output-file=docs/module-tree.txt", "--strict"]
language: system
always_run: true
pass_filenames: false
priority: 0
- id: export-functions
name: export-functions
entry: uv run --frozen --offline hooks/export-functions.py
args: ["--source-root=src/usethis", "--output-file=docs/functions.txt", "--strict"]
language: system
always_run: true
pass_filenames: false
priority: 0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.3
hooks:
- id: ruff-format
priority: 1
- repo: local
hooks:
- id: fix-readme
name: fix-readme
entry: uv run --frozen --offline hooks/fix-readme.py
args: ["--template=docs/README.md.jinja", "--output-file=README.md"]
language: system
always_run: true
pass_filenames: false
priority: 1
- id: fix-doc-sync
name: fix-doc-sync
entry: uv run --frozen --offline hooks/fix-doc-sync.py
args: ["AGENTS.md"]
language: system
always_run: true
pass_filenames: false
priority: 1
- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.8.1
hooks:
- id: prettier
types_or: [markdown]
priority: 2
- repo: local
hooks:
- id: deptry
name: deptry
entry: uv run --frozen --offline deptry src
language: system
always_run: true
pass_filenames: false
priority: 3
- id: import-linter
name: import-linter
entry: uv run --frozen --offline lint-imports
language: system
always_run: true
pass_filenames: false
priority: 3
- id: ty
name: ty
entry: uv run --frozen --offline ty check
language: system
types_or: [python, pyi]
always_run: true
require_serial: true
priority: 3
default_stages:
- pre-commit
- pre-push
default_install_hook_types:
- pre-commit
- pre-push
- post-checkout
- post-merge
- post-rewrite