-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathlefthook.yml
More file actions
52 lines (44 loc) · 1.02 KB
/
lefthook.yml
File metadata and controls
52 lines (44 loc) · 1.02 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
templates:
run: run --no-sync
pre-commit:
parallel: true
jobs:
- name: ruff
glob: "*.{py,pyi}"
stage_fixed: true
group:
piped: true
jobs:
- name: check
run: uv {run} ruff check --fix {staged_files}
- name: format
run: uv {run} ruff format {staged_files}
- name: format_ignores
glob: "*.{py,pyi}"
exclude:
- tool/test/test_format_ignores.py
stage_fixed: true
run: uv {run} tool/format_ignores.py {staged_files}
- name: dprint
glob: "*.{json,jsonc,md,toml,yaml,yml}"
stage_fixed: true
run: uv {run} dprint fmt {staged_files}
- name: basedpyright
glob: "*.{py,pyi}"
run: uv {run} basedpyright --threads=3 {staged_files}
- name: mkdocs
glob:
- "docs/**"
- "CONTRIBUTING.md"
- "mkdocs.yml"
- "uv.lock"
run: uv {run} mkdocs build
post-checkout:
jobs:
- run: uv sync
glob: uv.lock
post-merge:
files: "git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD"
jobs:
- run: uv sync
glob: uv.lock