-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
71 lines (63 loc) · 1.79 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
---
repos:
- repo: https://github.com/python-poetry/poetry
rev: '1.8.3'
hooks:
- id: poetry-check
- id: poetry-lock
- id: poetry-export
- id: poetry-install
- repo: https://github.com/commitizen-tools/commitizen
rev: v2.24.0
hooks:
- id: commitizen
stages: [commit-msg]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: trailing-whitespace
exclude_types:
- javascript
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-json
- id: check-yaml
- id: end-of-file-fixer
- id: fix-encoding-pragma
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
# https://github.com/PyCQA/isort/issues/1518
args: ["--profile", "black", --line-length=72]
- repo: https://github.com/ambv/black
rev: 22.3.0
hooks:
- id: black
language_version: python3
- repo: https://github.com/PyCQA/autoflake
rev: v2.1.1
hooks:
- id: autoflake
args:
- "--in-place"
- "--expand-star-imports"
- "--remove-duplicate-keys"
- "--remove-unused-variables"
- "--remove-all-unused-imports"
# Autogenerated code, ets not autoflake this
- "--exclude=gordon/mash/*"
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.902
hooks:
- id: mypy
files: ^gateway/
exclude: tests
additional_dependencies: [types-python-dateutil, types-requests, types-pyyaml, types-click]
args: [--ignore-missing-imports] # TODO add --strict!
- repo: https://github.com/PyCQA/bandit
rev: '1.7.8'
hooks:
- id: bandit
args: ["-c", "pyproject.toml"]