File tree Expand file tree Collapse file tree 1 file changed +26
-9
lines changed Expand file tree Collapse file tree 1 file changed +26
-9
lines changed Original file line number Diff line number Diff line change 1
1
# Refer for explanation to following link:
2
2
# https://lefthook.dev/configuration/
3
- #
3
+
4
+ templates :
5
+ run : run --no-sync
4
6
5
7
pre-commit :
6
8
parallel : true
7
9
jobs :
8
- - name : ruff-fix
9
- glob : " *.py"
10
- run : uv run ruff check --fix {staged_files}
11
- - name : ruff-format
12
- glob : " *.py"
13
- run : uv run ruff format {staged_files}
10
+ - name : ruff
11
+ glob : " *.{py,pyi}"
12
+ stage_fixed : true
13
+ group :
14
+ piped : true
15
+ jobs :
16
+ - name : check
17
+ run : uv {run} ruff check --fix {staged_files}
18
+ - name : format
19
+ run : uv {run} ruff format {staged_files}
14
20
- name : mypy
15
- glob : " *.py"
16
- run : uv run --group mypy mypy {staged_files}
21
+ glob : " *.{py,pyi}"
22
+ run : uv {run} mypy {staged_files}
23
+
24
+ post-checkout :
25
+ jobs :
26
+ - run : uv sync
27
+ glob : uv.lock
28
+
29
+ post-merge :
30
+ files : " git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD"
31
+ jobs :
32
+ - run : uv sync
33
+ glob : uv.lock
You canβt perform that action at this time.
0 commit comments