-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
.pre-commit-config.yaml
109 lines (99 loc) · 3.17 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
default_language_version:
python: python3.9
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
args: [ '--maxkb=500' ]
- id: check-ast
- id: check-executables-have-shebangs
- id: check-json
exclude: ^pyrightconfig\.json$
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-vcs-permalinks
- id: check-xml
- id: check-yaml
- id: destroyed-symlinks
- id: detect-aws-credentials
args: [ "--allow-missing-credentials" ]
- id: detect-private-key
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: forbid-submodules
- id: mixed-line-ending
args: [ "--fix=lf" ]
- id: name-tests-test
args: [ "--pytest-test-first" ]
- id: no-commit-to-branch
args: [ "--branch=main" ]
- id: pretty-format-json
args: [ --autofix, --no-sort-keys ]
# ignore jupyter notebooks
exclude: (^.*\.ipynb$|^pyrightconfig\.json$|^tests/e2e/artifacts/.*\.json$)
- id: pretty-format-json
args: [ --autofix, --no-sort-keys, --indent=1, --no-ensure-ascii ]
# only jupyter notebooks
files: ^.*\.ipynb$
- id: trailing-whitespace
exclude: ^\.bumpversion\.cfg$
- repo: https://github.com/python-jsonschema/check-jsonschema.git
rev: 0.30.0
hooks:
- id: check-github-actions
- id: check-github-workflows
- id: check-jsonschema
name: "Check GitHub Workflows set timeout-minutes"
files: ^\.github/workflows/[^/]+$
types: [ yaml ]
args: [ "--builtin-schema", "github-workflows-require-timeout" ]
- id: check-readthedocs
- repo: https://github.com/rhysd/actionlint
rev: v1.7.4
hooks:
- id: actionlint
- repo: https://github.com/kynan/nbstripout
rev: 0.8.1
hooks:
- id: nbstripout
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args: [ "-L", "probly", "-L", "mis" ]
exclude: ^docs/_static/.*\.(js|html)$|^src/ridgeplot/.*\.c$
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
# mdformat is not enabled by default, but can be run manually with:
# pre-commit run mdformat --all-files --hook-stage manual
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.21
hooks:
- id: mdformat
stages: [ manual ]
files: '^docs/.*\.md$'
args: [ --check ]
additional_dependencies:
- mdformat-gfm
- mdformat-myst
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.23
hooks:
- id: validate-pyproject
- repo: https://github.com/mgedmin/check-manifest
rev: "0.50"
hooks:
- id: check-manifest
args: [ --no-build-isolation ]
additional_dependencies: [setuptools-scm]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.4
hooks:
- id: ruff-format
- id: ruff
args: [ --show-fixes, --exit-non-zero-on-fix ]