-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
132 lines (116 loc) · 3.73 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# pre-commit
# Ref: https://pre-commit.com/#usage
# ------------------------------------------------------------------------------
# Ref: https://pre-commit.ci/#configuration
ci:
autofix_prs: false
autoupdate_commit_msg: 'build: update pre-commit hooks'
autoupdate_schedule: monthly
skip: [licensecheck] # does not run on pre-commit.ci, due to sqlite error, runs locally
# Exclude "cassette" files: auto-generated by vcr.py
# Exclude changelog: auto-generated by python-semantic-release
exclude: |
(?x)^(
tests/cassettes/repository.yaml|
CHANGELOG.md
)$
repos:
# Ref: https://pre-commit.com/#meta-hooks
- repo: meta
hooks:
- id: check-hooks-apply
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
hooks:
- id: check-merge-conflict
- id: check-case-conflict
- id: check-ast
- id: debug-statements
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: name-tests-test
args: [--pytest-test-first]
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: a6273196190bb0f68caf1dc68073cf62c719f725 # frozen: v2.14.0
hooks:
- id: pretty-format-yaml
args: [--autofix, --indent, '2']
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 37cd56d9d154dfb0648eaee8efc1040512700c47 # frozen: 0.29.4
hooks:
- id: check-dependabot
- id: check-github-workflows
- repo: https://github.com/tox-dev/pyproject-fmt
rev: 6b2f3b33754de7a442043dc312fc5a0e473086d2 # frozen: v2.5.0
hooks:
- id: pyproject-fmt
- repo: https://github.com/executablebooks/mdformat
rev: 86542e37a3a40974eb812b16b076220fe9bb4278 # frozen: 0.7.18
hooks:
- id: mdformat
args: [--number, --wrap=120, --ignore-missing-references]
exclude: |
(?x)^(
CHANGELOG.md|
.changelog.md|
docs/src/api.md|
docs/src/cli.md|
docs/src/exceptions.md|
docs/src/resources.md
)$
additional_dependencies:
- mdformat-mkdocs[recommended]>=v2.0.7
- repo: https://github.com/provinzkraut/unasyncd
rev: 572842a04440d45bd7d6bee5a6a4d006891d8c66 # frozen: v0.8.1
hooks:
- id: unasyncd
additional_dependencies:
- ruff==0.6.1
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 6a19e69c83fd6e3a3ffdd5e32a40e35c37b02218 # frozen: v0.7.3
hooks:
- id: ruff
args: [--fix, --show-fixes, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: f56614daa94d5cd733d3b7004c5df9caad267b4a # frozen: v1.13.0
hooks:
- id: mypy
args: [--config-file=pyproject.toml]
additional_dependencies:
- httpx>=0.27
- pytest>=8.2
- respx>=0.21
- typer>=0.12
- xsdata>=24.5
- repo: https://github.com/scientific-python/cookie
rev: 35368e874265d105e1ca3355df7ef51bbca8eba6 # frozen: 2024.08.19
hooks:
- id: sp-repo-review
- repo: https://github.com/crate-ci/typos
rev: 1f45ba1bc5bf72a7cef6368fb404d276ab13820a # frozen: typos-dict-v0.11.35
hooks:
- id: typos
args: [--force-exclude]
exclude: src/re3data/_resources/repository.py|tests/conftest.py
- repo: https://github.com/FHPythonUtils/LicenseCheck/
rev: ce61579e4b9bb83d0697f78997a400d7a2554a4f # frozen: 2024.3
hooks:
- id: licensecheck
- repo: https://github.com/compilerla/conventional-pre-commit
rev: 48af87c8983cb0f5ba7693448da007b731196715 # frozen: v3.6.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
- repo: local
hooks:
- id: check-todos
name: check for todos
description: Enforce that there are no TODOs left in the code base
entry: TODO
language: pygrep
types: [text]
exclude: .pre-commit-config.yaml