-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
100 lines (89 loc) · 2.34 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
# To install the git pre-commit hook run:
# pre-commit install
# To update the pre-commit hooks run:
# pre-commit install-hooks
#exclude: '^(.tox/)$'
repos:
- repo: meta
hooks:
- id: check-useless-excludes
- id: check-hooks-apply
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: mixed-line-ending
args: [--fix=lf]
- id: check-added-large-files
- id: check-case-conflict
#- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: check-merge-conflict
- id: check-yaml
- repo: https://github.com/ambv/black
rev: 22.10.0
hooks:
- id: black
name: "Format code"
language_version: python3
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
args: [--settings-path=pyproject.toml]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
hooks:
- id: mypy
args:
- --follow-imports=normal
- --install-types
- --non-interactive
additional_dependencies:
- "asterisklint"
- "setuptools"
- "versioningit"
exclude: ^(tests/.*\.py$)
- repo: https://github.com/myint/autoflake
rev: v2.0.0
hooks:
- id: autoflake
args:
- --in-place
- --remove-all-unused-imports
- --remove-duplicate-keys
- --remove-unused-variables
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies:
- "flake8-bugbear"
- "asterisklint"
- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
hooks:
- id: bandit
args: ["-ll", "-q", "-r"]
- repo: https://github.com/PyCQA/doc8
rev: v1.0.0
hooks:
- id: doc8
args:
- '--max-line-length=90'
- '--ignore=D001'
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0
hooks:
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal
# - repo: https://github.com/adrienverge/yamllint
# rev: v1.26.3
# hooks:
# - id: yamllint
- repo: https://github.com/jorisroovers/gitlint
rev: v0.18.0
hooks:
- id: gitlint