-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
85 lines (85 loc) · 2.21 KB
/
.pre-commit-config.yaml
File metadata and controls
85 lines (85 loc) · 2.21 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
ci:
# All linting runs in GitHub Actions ("Lint & type check" job).
# Skip every hook so pre-commit.ci is a no-op until the app is removed
# from https://github.com/organizations/WMD-group/settings/installations
skip:
[
ruff-check,
ruff-format,
codespell,
pyright,
check-yaml,
end-of-file-fixer,
trailing-whitespace,
markdownlint,
prettier,
nbstripout,
blacken-docs,
]
repos:
- repo: local
hooks:
- id: ruff-check
name: ruff check
entry: uv run ruff check --fix
language: system
types_or: [python, pyi]
- id: ruff-format
name: ruff format
entry: uv run ruff format
language: system
types_or: [python, pyi]
- id: codespell
name: codespell
entry: uv run codespell
language: system
pass_filenames: false
- id: pyright
name: pyright
entry: uv run pyright smact/
language: system
types: [python]
pass_filenames: false
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.47.0
hooks:
- id: markdownlint
# MD013: line too long
# MD024: Multiple headings with the same content
# MD033: no inline HTML
# MD041: first line in a file should be a top-level heading
# MD025: single title
args:
[
--ignore,
"dev_docs/design_docs/*",
--disable,
MD013,
MD024,
MD025,
MD033,
MD041,
"--",
]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
args: [--write] # edit files in-place
additional_dependencies:
- prettier
- repo: https://github.com/kynan/nbstripout
rev: 0.9.0
hooks:
- id: nbstripout
args: [--drop-empty-cells, --keep-output]
- repo: https://github.com/adamchainz/blacken-docs
rev: 1.20.0
hooks:
- id: blacken-docs