-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
86 lines (84 loc) · 2.25 KB
/
.pre-commit-config.yaml
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
86
ci:
skip: [typing]
exclude: |
(?x)^(
{{cookiecutter.project_slug}}/tests/test_import.py
)$
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
args: ['--maxkb=25']
- id: check-case-conflict
- id: check-merge-conflict
- id: check-vcs-permalinks
- id: check-yaml
exclude: |
(?x)^(
{{cookiecutter.project_slug}}/.pre-commit-config.yaml
)$
- id: debug-statements
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: no-commit-to-branch
args: [--branch, main]
- id: trailing-whitespace
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-check-blanket-noqa
- id: python-check-mock-methods
- id: python-no-eval
- id: python-no-log-warn
- id: python-use-type-annotations
- id: text-unicode-replacement-char
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.4
hooks:
- id: ruff
args: [--config, pyproject.toml, hooks, tests]
pass_filenames: false
- id: ruff-format
args: [--config, pyproject.toml]
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.21
hooks:
- id: mdformat
additional_dependencies: [
mdformat-gfm,
mdformat-ruff,
]
args: [--wrap, "88"]
files: (README\.md)
exclude: |
(?x)^(
{{cookiecutter.project_slug}}/README.md
)$
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.21
hooks:
- id: mdformat
additional_dependencies: [
mdformat-myst,
mdformat-ruff,
]
args: [--wrap, "88"]
files: (docs/.)
- repo: https://github.com/crate-ci/typos
rev: v1.28.4
hooks:
- id: typos
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
# - id: identity # Prints all files passed to pre-commits. Debugging.
- repo: local
hooks:
- id: typing
name: typing
language: system
entry: uv run tox -e typing
pass_filenames: false