-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
78 lines (67 loc) · 1.65 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
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.6.0
hooks:
- id: check-ast
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: .*\.svg
- 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.18
hooks:
- id: validate-pyproject
# format python codes by black
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.4.2
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.4.6
hooks:
- id: ruff
args: [--fix]
# lint and format jupyter notebooks by nbqa-ruff
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.8.5
hooks:
- id: nbqa-ruff
args: [--fix, --ignore=E402]
# lint cython codes
# - repo: https://github.com/MarcoGorelli/cython-lint
# rev: v0.16.2
# hooks:
# - id: cython-lint
# format yaml files
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.13.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]
# lint docstrings by numpydoc
- repo: https://github.com/numpy/numpydoc
rev: v1.7.0
hooks:
- id: numpydoc-validation