forked from MiraGeoscience/geoh5py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
109 lines (106 loc) · 2.94 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
exclude: docs/(conf.py|_ext/)
default_stages: [commit,push]
fail_fast: false
ci:
skip: [pylint]
repos:
- repo: https://github.com/psf/black
rev: 21.7b0
hooks:
- id: black
types: [text]
types_or: [python, pyi]
- repo: https://github.com/asottile/seed-isort-config
rev: v2.2.0
hooks:
- id: seed-isort-config
types: [text]
types_or: [python, pyi]
- repo: https://github.com/PyCQA/isort
rev: 5.9.2
hooks:
- id: isort
additional_dependencies: [toml] # to read config from pyproject.toml
types: [text]
types_or: [python, pyi]
- repo: https://github.com/humitos/mirrors-autoflake
rev: v1.1
hooks:
- id: autoflake
types: [text]
types_or: [python, pyi]
- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
hooks:
- id: flake8
types: [text]
types_or: [python, pyi]
- repo: https://github.com/asottile/pyupgrade
rev: v2.21.2
hooks:
- id: pyupgrade
args: [--py37-plus]
types: [text]
types_or: [python, pyi]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.910
hooks:
- id: mypy
additional_dependencies: [types-toml]
args: [--ignore-missing-imports, --scripts-are-modules, --show-error-context,
--show-column-numbers]
- repo: local
hooks:
- id: pylint
name: pylint
entry: poetry run pylint
language: system
require_serial: true # pylint does its own parallelism
types: [text]
types_or: [python, pyi]
exclude: (devtools|docs)/
- id: check-copyright
name: Check copyright
entry: python devtools/check-copyright.py
language: python
types: [text]
types_or: [python, pyi]
exclude: ^(devtools/|docs/|setup.py)
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
- id: codespell
exclude: (\.ipynb$|^\.github/workflows/issue_to_jira.yml$)
types: [text]
types_or: [python, pyi]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: trailing-whitespace
exclude: \.mdj$
- id: check-toml
- id: check-yaml
# - id: check-added-large-files # crashing on some configuration. To be investigated
- id: check-case-conflict
- id: check-merge-conflict
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
exclude: \.mdj$
- id: mixed-line-ending
- id: name-tests-test
- repo: local
hooks:
- id: rstcheck
name: rstcheck
entry: rstcheck
files: '.rst'
language: python
additional_dependencies: [rstcheck, sphinx]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0
hooks:
- id: rst-backticks
exclude: ^THIRD_PARTY_SOFTWARE.rst$