forked from eWaterCycle/ewatercycle
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
95 lines (95 loc) · 2.8 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-case-conflict
- id: check-merge-conflict
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- repo: https://github.com/adrienverge/yamllint
rev: "v1.29.0"
hooks:
- id: yamllint
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v1.17.0
hooks:
- id: setup-cfg-fmt
- repo: https://github.com/psf/black
rev: "22.3.0"
hooks:
- id: black-jupyter
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
# TODO renable when errors are fixed/ignored
# - repo: https://github.com/pycqa/pylint
# rev: "v2.9.6"
# hooks:
# - id: pylint
# TODO renable when errors are fixed/ignored
- repo: https://github.com/pycqa/flake8
rev: "3.9.2"
hooks:
- id: flake8
additional_dependencies:
&fd [
flake8-annotations-complexity,
flake8-bandit,
flake8-blind-except,
flake8-bugbear,
flake8-builtins,
flake8-cognitive-complexity,
flake8-comprehensions,
flake8-docstrings,
flake8-eradicate,
flake8-executable,
flake8-expression-complexity,
flake8-if-expr,
flake8-implicit-str-concat,
flake8-logging-format,
flake8-pathlib,
flake8-print,
flake8-pytest,
flake8-pytest-style,
# flake8-quotes, # conflicts with blacks double quote preference
flake8-raise,
flake8-return,
flake8-typing-imports,
flake8-variables-names,
flake8==3.9.2,
pandas-vet,
pep8-naming,
# wemake-python-styleguide, # conflicts with black
yesqa,
]
verbose: true
args: &fa [--statistics, --exit-zero]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.1.1
hooks:
- id: mypy
additional_dependencies: [types-python-dateutil, pydantic]
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.1.0
hooks:
- id: nbqa-isort
additional_dependencies: [isort==5.11.2]
- id: nbqa-mypy
additional_dependencies: [mypy==1.1.1, types-python-dateutil, pydantic]
# TODO renable when errors are fixed/ignored
- id: nbqa-flake8
additional_dependencies: *fd
args: *fa
verbose: true
# TODO renable when errors are fixed/ignored
# - id: nbqa-pylint
# additional_dependencies: [pylint==2.9.6]
- repo: https://github.com/regebro/pyroma
rev: "3.2"
hooks:
- id: pyroma