-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
61 lines (53 loc) · 1.67 KB
/
.pre-commit-config.yaml
File metadata and controls
61 lines (53 loc) · 1.67 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
default_stages: [pre-commit]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
# These are safe to run in both local & CI (they don't require "fix vs check" split)
- id: check-added-large-files
stages: [pre-commit, manual]
- id: check-yaml
stages: [pre-commit, manual]
- id: check-toml
stages: [pre-commit, manual]
- id: check-merge-conflict
stages: [pre-commit, manual]
# These modify files. Run locally only (pre-commit stage).
- id: end-of-file-fixer
stages: [pre-commit]
- id: trailing-whitespace
stages: [pre-commit]
- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.15.2
hooks:
- id: pyproject-fmt
stages: [pre-commit] # modifies -> local only
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.25
hooks:
- id: validate-pyproject
stages: [pre-commit, manual]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.0
hooks:
# --------------------------
# LOCAL AUTOFIX (developers)
# --------------------------
- id: ruff-check
name: ruff-check (fix)
args: [--fix, --unsafe-fixes]
stages: [pre-commit]
- id: ruff-format
name: ruff-format (write)
stages: [pre-commit]
# --------------------------
# CI CHECK-ONLY (no writes)
# --------------------------
- id: ruff-check
name: ruff-check (ci)
args: [--output-format=github]
stages: [manual]
- id: ruff-format
name: ruff-format (ci)
args: [--check, --diff]
stages: [manual]