-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
88 lines (73 loc) · 2.75 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: c4a0b883114b00d8d76b479c820ce7950211c99b # frozen: v4.5.0
hooks:
# check file system problems
- id: check-case-conflict
- id: check-symlinks
- id: destroyed-symlinks
# unify whitespace and line ending
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: end-of-file-fixer
- id: mixed-line-ending
# sort requirements.txt files
- id: requirements-txt-fixer
# check more
- id: check-yaml
- id: check-toml
- id: check-xml
- id: check-executables-have-shebangs
- id: check-merge-conflict
# Enforce frozen revisions in `.pre-commit-config.yaml`
- repo: https://github.com/real-yfprojects/check-pre-commit-config
rev: 27c71bd46101a7de517863033531963b7d04dee2 # frozen: v1.0.0-alpha3
hooks:
- id: check-frozen
- repo: https://github.com/python-poetry/poetry
rev: "ceeb1892a1f7456a65cd847ad36d740a577dee5e" # frozen: 1.7.0
hooks:
- id: poetry-check
- id: poetry-lock
args: ["--no-update"]
# - repo: https://github.com/floatingpurr/sync_with_poetry
# rev: 6fd6194c7bbd629b18a7bcd7a4a38a57f128b451 # 0.4.0
# hooks:
# - id: sync_with_poetry
# files: ^\.pre-commit-config\.yaml|poetry\.lock$
# pass_filenames: false
# args:
# - "poetry.lock"
- repo: https://github.com/psf/black
rev: 2a1c67e0b2f81df602ec1f6e7aeb030b9709dc7c # frozen: 23.11.0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "00a717a960678b4e6dfa62920c6046b6fb8f1c7b" # frozen: v4.0.0-alpha.3-1
hooks:
- id: prettier
exclude: ^docs/source/(_polyversion/|_)templates/
- repo: https://github.com/abravalheri/validate-pyproject
rev: 57fe0d1748f3ace002f5599289f5a53330555b20 # frozen: v0.15
hooks:
- id: validate-pyproject
files: pyproject.toml$
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "a6ff26895e5ae243a36999ba87eb6b4af3c202b3" # frozen: v0.1.7
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
# configuration for the pre-commit.ci bot
# only relevant when actually using the bot
ci:
autofix_commit_msg: |
[pre-commit.ci] auto fixes from pre-commit hooks
for more information, see https://pre-commit.ci, https://pre-commit.com and
the `.pre-commit-config.yaml` file in this repository.
autofix_prs: true # default
autoupdate_branch: "develop"
autoupdate_commit_msg: |
[pre-commit.ci] Autoupdate pre-commit hook versions.
for more information, see https://pre-commit.ci, https://pre-commit.com and
the `.pre-commit-config.yaml` file in this repository.
submodules: false # default