forked from probabilistic-numerics/probnum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
48 lines (48 loc) · 1.59 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
exclude: |
(?x)
# Readme file(s)
^README\.md$|
# Library files can have extraneous formatting (even minimized)
/static/(src/)?lib/|
# Repos using Sphinx to generate docs don't need prettying
^docs/_templates/.*\.html$|
# You don't usually want a bot to modify your legal texts
(LICENSE.*|COPYING.*)
default_language_version:
python: python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: check-added-large-files
# Default is 500 which is too strict on the notebooks.
args: ['--maxkb=1000']
- id: check-json
- id: pretty-format-json
- id: check-merge-conflict
# exclude files where underlines are not distinguishable from merge conflicts
exclude: /README\.rst$|^docs/.*\.rst$
- id: check-yaml
- id: end-of-file-fixer
# exclude autogenerated files
exclude: /README\.rst$|\.pot?$
- id: sort-simple-yaml
- id: trailing-whitespace
# exclude autogenerated files
exclude: /README\.rst$|\.pot?$
- repo: https://github.com/psf/black
rev: 20.8b0 # Make sure to use the same tag/version as specified in tox.ini.
hooks:
- id: black
language_version: python3
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.5.4 # Make sure to use the same tag/version as specified in tox.ini.
hooks:
- id: isort
- repo: https://github.com/myint/docformatter
rev: v1.3.1
hooks:
- id: docformatter
args: ['--in-place',
'--wrap-summaries', '88',
'--wrap-descriptions', '88']