-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathlefthook.yml
More file actions
37 lines (33 loc) · 844 Bytes
/
lefthook.yml
File metadata and controls
37 lines (33 loc) · 844 Bytes
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
# Refer for explanation to following link:
# https://lefthook.dev/configuration/
templates:
run: run --no-sync
pre-commit:
parallel: true
jobs:
- name: dprint
glob: "*.{json,jsonc,md,toml,yaml,yml}"
stage_fixed: true
run: uv {run} dprint fmt --incremental=false
- 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: mypy
glob: "*.{py,pyi}"
run: uv {run} mypy {staged_files}
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