-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy path.lefthook.yml
41 lines (40 loc) · 1.11 KB
/
.lefthook.yml
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
pre-commit:
commands:
black:
files: git ls-files
glob: '*.{py, ipynb}'
run: rye fmt {staged_files}
stage_fixed: true
clean-jupyter:
files: git ls-files
glob: '*.ipynb'
run: jupyter nbconvert --clear-output --inplace {staged_files}
stage_fixed: true
ruff:
files: git ls-files
glob: '*.py'
run: ruff check {staged_files} --fix
pyright:
files: git ls-files
glob: '*.py'
run: pyright {staged_files}
lychee:
run: lychee . --suggest --max-concurrency 32 --cache --format detailed --header "accept=*/*" --max-cache-age 7d
pre-merge:
commands:
black:
glob: '*.{py, ipynb}'
run: rye fmt {all_files}
stage_fixed: true
clean-jupyter:
glob: '*.ipynb'
run: jupyter nbconvert --clear-output --inplace {all_files}
stage_fixed: true
ruff:
glob: '*.py'
run: ruff check {all_files} --fix
pyright:
glob: '*.py'
run: pyright {staged_files}
lychee:
run: lychee . --suggest --max-concurrency 32 --cache --format detailed --header "accept=*/*" --max-cache-age 7d