-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
59 lines (48 loc) · 1.68 KB
/
.pre-commit-config.yaml
File metadata and controls
59 lines (48 loc) · 1.68 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
# Top-level configuration
minimum_pre_commit_version: "3.6.0"
default_install_hook_types: [pre-commit, commit-msg, pre-push]
language_version:
python: python3.12
ci:
autoupdate_commit_msg: "chore: update pre-commit hooks"
autofix_commit_msg: "style: pre-commit fixes"
autoupdate_schedule: monthly
# exclude: ^(notebooks/|\.cruft\.json|\.copier-answers\.yml)$ # add more patterns as needed
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.14.4
hooks:
# Run the linter.
- id: ruff-check
types_or: [ python, pyi ]
args: [ --fix ]
# Run the formatter.
- id: ruff-format
types_or: [ python, pyi ]
# ── Docstring & README code-block formatter (needs Black internally) ───────
- repo: https://github.com/adamchainz/blacken-docs
rev: "1.20.0" # replace with latest tag on GitHub
hooks:
- id: blacken-docs
additional_dependencies:
- black==22.12.0
# ── Workflow / schema validation – catches CI config errors early ─────────
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.24.1
hooks:
- id: validate-pyproject
- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.8.0
hooks:
- id: pyproject-fmt
- repo: https://github.com/rhysd/actionlint
rev: v1.7.8
hooks:
- id: actionlint
files: "^\\.github/workflows/.*\\.ya?ml$"
# ── Meta hooks for pre-commit config validation ───────────────────────────
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes