-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy path.lefthook.yml
More file actions
62 lines (52 loc) · 1.35 KB
/
Copy path.lefthook.yml
File metadata and controls
62 lines (52 loc) · 1.35 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
57
58
59
60
61
62
templates:
run: run --no-sync
pre-commit:
parallel: true
skip:
- merge
- rebase
jobs:
- name: uv lock
glob: pyproject.toml
stage_fixed: true
run: uv lock
- 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 --quiet {staged_files}
- name: basedpyright
glob: "*.{py,pyi}"
run: uv {run} basedpyright --threads 3 {staged_files}
- name: pyrefly
glob: "*.{py,pyi}"
run: uv {run} pyrefly check {staged_files}
- name: mypy
glob: "*.{py,pyi}"
# passing staged files will confuse mypy, due to there both being a
# `__init__.py` and a `__init__.pyi`
run: uv {run} mypy .
- name: pytest
glob: "*.{py,pyi}"
run: uv {run} pytest --quiet --no-summary
- name: pytest
glob: "optype/**/*.{py,pyi}"
run: uv {run} ty check
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