-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
72 lines (62 loc) · 1.53 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
ci:
autofix_prs: true
autoupdate_schedule: quarterly
autoupdate_branch: development
default_language_version:
node: 16.15.0
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-ast
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: VERSION
- id: check-merge-conflict
exclude: .*\.rst
- id: check-symlinks
- id: check-case-conflict
- id: check-json
- id: check-toml
- id: check-yaml
# validate pyproject.toml
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.15
hooks:
- id: validate-pyproject
# format python codes by black
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.12.1
hooks:
- id: black
language_version: python3.10
# lint and format python codes by ruff
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.9
hooks:
- id: ruff
args: [--fix]
# lint and format jupyter notebooks by nbqa-ruff
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.7.1
hooks:
- id: nbqa-ruff
args: [--fix, --ignore=E402]
# lint cython codes
- repo: https://github.com/MarcoGorelli/cython-lint
rev: v0.16.0
hooks:
- id: cython-lint
# format yaml files
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.12.0
hooks:
- id: pretty-format-yaml
args: [--autofix, --indent, '2']
# format docstrings in python codes
- repo: https://github.com/PyCQA/docformatter
rev: v1.7.5
hooks:
- id: docformatter
additional_dependencies: [tomli]
args: [--in-place]