-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
98 lines (86 loc) · 2.44 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0 # Use the ref you want to point at
hooks:
- id: check-case-conflict
- id: check-docstring-first
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
types: [python]
- id: fix-byte-order-marker
- id: name-tests-test
args: ["--pytest-test-first"]
- id: no-commit-to-branch # Protects main/master by default
- id: requirements-txt-fixer
- id: trailing-whitespace
types: [python, yaml, markdown]
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.13.0
hooks:
- id: markdownlint-cli2
args: []
- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
hooks:
- id: pyupgrade
args: [--py38-plus]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.6.3
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.8.0
hooks:
- id: black
types: [python]
additional_dependencies: ["click==8.0.4"]
# args: ["--extend-exclude", ""]
- id: black-jupyter
- repo: https://github.com/adamchainz/blacken-docs
rev: 1.18.0
hooks:
- id: blacken-docs
additional_dependencies:
- black==22.12.0
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
hooks:
- id: nbstripout
- repo: https://github.com/numpy/numpydoc
rev: v1.8.0
hooks:
- id: numpydoc-validation
- repo: local
hooks:
- id: pylint
args: ["--rcfile=.pylintrc"]
name: Pylint
entry: python -m pylint
language: system
files: \.py$
- repo: local
hooks:
- id: pytest
name: Pytest (testmon)
entry: pytest --testmon
language: system
files: \.py$
ci:
autofix_prs: true
autofix_commit_msg: "[pre-commit.ci] Fixing issues with pre-commit"
autoupdate_schedule: monthly
autoupdate_commit_msg: "[pre-commit.ci] pre-commit-autoupdate"
skip: [pylint, pytest] # Optionally list ids of hooks to skip on CI