-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlefthook.yaml
More file actions
32 lines (30 loc) · 738 Bytes
/
lefthook.yaml
File metadata and controls
32 lines (30 loc) · 738 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
templates:
# This hooks require uv to run
run_python: 'uv run'
remotes:
- git_url: 'https://github.com/attakei/workspace-configs'
ref: 'v0.7.1'
configs:
- 'projects/sphinx-doc/lefthook.yaml'
pre-commit:
parallel: true
jobs:
- name: 'Ruff'
glob: '*.py'
group:
parallel: false
jobs:
- name: format
stage_fixed: true
run: '{run_python} ruff format {staged_files}'
- name: lint
stage_fixed: true
run: '{run_python} ruff check --fix {staged_files}'
commands:
ty:
glob: '*.py'
exclude:
run: '{run_python} ty check {staged_files}'
pytest:
glob: '*.py'
run: '{run_python} pytest'