-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.pre-commit-config.yaml
161 lines (136 loc) · 3.7 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# https://pre-commit.com/
default_stages: [ commit, push ]
default_language_version:
python: python3.9
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0 # Possible releases: https://github.com/pre-commit/pre-commit-hooks/releases
hooks:
- id: no-commit-to-branch
always_run: true
- id: check-ast
always_run: true
- id: check-json
always_run: true
- id: pretty-format-json
always_run: true
args: [ --autofix, --indent=4 ]
- id: check-toml
always_run: true
- id: check-yaml
always_run: true
- id: check-xml
always_run: true
- id: fix-encoding-pragma
always_run: true
args: [ --remove ]
- id: end-of-file-fixer
always_run: true
- id: check-docstring-first
always_run: true
- id: trailing-whitespace
exclude: .md$
always_run: true
- id: check-added-large-files
always_run: true
- id: detect-private-key
always_run: true
- id: detect-aws-credentials
always_run: false
args: [ --allow-missing-credentials ]
- repo: https://github.com/bwhmather/ssort
rev: v0.11.6 # Possible releases: https://github.com/bwhmather/ssort/releases
hooks:
- id: ssort
entry: ssort
files: ^deker/
always_run: false
stages:
- commit
- repo: https://github.com/pycqa/isort
rev: 5.12.0 # Possible releases: https://github.com/pycqa/isort/releases
hooks:
- id: isort
always_run: false
name: isort (python)
entry: isort
args: [ --profile=black ]
stages:
- commit
# - repo: https://github.com/hadialqattan/pycln
# rev: v2.1.1 # Possible releases: https://github.com/hadialqattan/pycln/releases
# hooks:
# - id: pycln
# args: [ --config=pyproject.toml ]
- repo: https://github.com/psf/black
rev: 23.3.0 # Possible releases: https://github.com/psf/black/releases
hooks:
- id: black
always_run: false
stages:
- commit
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4 # Possible releases: https://github.com/PyCQA/flake8/releases
hooks:
- id: flake8
name: flake8
files: ^deker/
always_run: false
args: [ deker]
verbose: true
additional_dependencies:
- Flake8-pyproject
- flake8-bugbear
- flake8-pytest-style
- flake8-docstrings
- flake8-import-order
- darglint
stages:
- commit
# - repo: https://github.com/astral-sh/ruff-pre-commit
# # Ruff version.
# rev: v0.0.275
# hooks:
# - id: ruff
# files: ^deker/
# args: [--fix]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.3.0 # Possible releases: https://github.com/python/mypy/tags
hooks:
- id: mypy
name: mypy
files: ^deker/
always_run: false
args: [
--install-types,
--non-interactive,
--config-file=pyproject.toml
]
stages:
- commit
- repo: https://github.com/crate-ci/typos
rev: v1.14.11
hooks:
- id: typos
name: typos
files: ^deker/
stages:
- commit
- repo: local
hooks:
- id: pytest
name: pytest
entry: pytest
files: ^tests/
language: system
pass_filenames: false
always_run: true
stages:
- push
- id: doc8
name: doc8
entry: doc8 --config=pyproject.toml docs/deker
language: python
always_run: true
stages:
- commit