-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathlefthook.yml
More file actions
56 lines (52 loc) · 1.58 KB
/
lefthook.yml
File metadata and controls
56 lines (52 loc) · 1.58 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
lefthook: pixi run --no-progress --environment=lint --frozen lefthook
templates:
run: run --quiet --no-progress --environment=lint --frozen
colors: true
output:
- meta # Print lefthook version
- summary # Print summary block (successful and failed steps)
- empty_summary # Print summary heading when there are no steps to run
# - success # Print successful steps
# - failure # Print failed steps printing
# - execution # Print any execution logs
# - execution_out # Print execution output
# - execution_info # Print `EXECUTE > ...` logging
- skips # Print "skip" (i.e. no files matched)
pre-commit:
parallel: true
jobs:
- name: dprint
glob: "*.{json,jsonc,md,toml,yaml,yml}"
stage_fixed: true
run: pixi {run} dprint
- name: ruff
glob: "*.{py,pyi}"
stage_fixed: true
group:
piped: true
jobs:
- name: ruff check
run: pixi {run} ruff-check {staged_files}
- name: ruff format
run: pixi {run} ruff-format {staged_files}
- name: pyright
glob: "*.{py,pyi}"
run: pixi {run} pyright
- name: mypy
glob: "*.{py,pyi}"
run: pixi {run} mypy
- name: typos
stage_fixed: true
run: pixi {run} typos
- name: actionlint
run: pixi {run} actionlint
- name: blacken-docs
glob: "*.md"
stage_fixed: true
run: pixi {run} blacken-docs {staged_files}
- name: validate-pyproject
glob: "pyproject.toml"
run: pixi {run} validate-pyproject
- name: numpydoc
glob: "*.py"
run: pixi {run} numpydoc {staged_files}