-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
55 lines (55 loc) · 1.61 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
# https://pre-commit.com/
# poetry add pre-commit --dev
# poetry run pre-commit install
repos:
# making isort compatible with black
# see https://github.com/PyCQA/isort/issues/1518
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-case-conflict
- id: check-docstring-first
- id: check-json
exclude: ^(.vscode/|other/folder/) # weird errors with .vscode/*.json
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
exclude: ^((.*)\.(ipynb|otherext)) # avoid reformat notebooks everytime
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/pycqa/isort
rev: 5.9.3
hooks:
- id: isort
# args: ["--profile", "black"] set up in pyproject.toml
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/asottile/blacken-docs
rev: v1.12.0
hooks:
- id: blacken-docs
additional_dependencies: [black==21.11b1]
- repo: https://github.com/myint/rstcheck
rev: 3f92957478422df87bd730abde66f089cc1ee19b
hooks:
- id: rstcheck
args: [
# "--report",
# "info",
"--ignore-directives",
"autofunction,automodule,bibliography,math,numfig,plot,testcode,testoutput",
"--ignore-roles",
"eq,cite",
]
# notebooks
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.2.2
hooks:
- id: nbqa-black
- id: nbqa-isort
- repo: https://github.com/kynan/nbstripout
rev: 0.5.0
hooks:
- id: nbstripout