/
.pre-commit-config.yaml
81 lines (81 loc) · 2.11 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
# Apply to all files without commiting:
# pre-commit run --all-files
# Update this file:
# pre-commit autoupdate
default_language_version:
python: python3.11
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
# See https://pre-commit.com/hooks.html for more hooks
- id: check-added-large-files
args: [ "--maxkb=1024" ]
- id: check-ast
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
- id: codespell
exclude: "[a-zA-Z]*/(.)*txt"
- repo: https://github.com/asottile/seed-isort-config
rev: v2.2.0
hooks:
- id: seed-isort-config
- repo: https://github.com/asottile/pyupgrade
rev: v2.31.0
hooks:
- id: pyupgrade
args: [ "--py36-plus", "--py37-plus", "--py38-plus", "--py39-plus" ]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/pycqa/bandit
rev: 1.7.2
hooks:
- id: bandit
args: ["-c", "pyproject.toml"]
additional_dependencies: ["bandit[toml]"]
- repo: https://github.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
name: check python style (flake8)
additional_dependencies: [
"flake8-bugbear",
"flake8-comprehensions",
"flake8-mutable",
"flake8-print",
"flake8-simplify",
]
- repo: local
hooks:
- id: pylint
name: Python Linter (pylint)
entry: pylint
language: system
types: [python]
require_serial: true
- id: mypy
name: Python static checker (mypy)
entry: mypy
language: system
types: [python]
require_serial: true