-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
55 lines (51 loc) · 1.46 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
repos:
# general hooks to verify or beautify code
- repo: http://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0
hooks:
- id: check-added-large-files
args: [--maxkb=100000]
- id: trailing-whitespace
- id: check-docstring-first
- id: check-json
- id: check-merge-conflict
- id: check-xml
- id: check-yaml
exclude: ".helm"
- id: detect-aws-credentials
args: [
--allow-missing-credentials,
--credentials-file, docker-compose/.env,
]
- id: detect-private-key
- id: mixed-line-ending
- id: pretty-format-json
args: [--autofix]
# autoformat code with black formatter
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black
additional_dependencies: [click==8.0.4]
types: [python]
args: [-l 120]
# check code style
- repo: https://github.com/pycqa/flake8
rev: 3.7.9
hooks:
- id: flake8
additional_dependencies: [flake8-quotes==3.0.0]
types: [python]
args: [--config, .flake8]
# sort imports
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black", "--trailing-comma", "--multi-line", "3"]
# autodelete unused imports
- repo: https://github.com/hadialqattan/pycln
rev: v1.1.0
hooks:
- id: pycln
args: [ --all ]