-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
57 lines (50 loc) · 1.83 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
exclude: ^proto/zkp_auth_pb2_grpc.py$|^proto/zkp_auth_pb2.py$
repos:
# bandit is a tool designed to find common security issues in Python code.
- repo: https://github.com/PyCQA/bandit
rev: 1.7.5
hooks:
- id: bandit
args: ["-v", "-c", "pyproject.toml"]
additional_dependencies: [".[toml]"]
# black is the uncompromising Python code formatter.
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
args: [--line-length=110]
# flake8 is a Python code linter that enforces coding style and detects errors in Python code.
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
args: [--config, .flake8]
# isort sorts imports alphabetically, and automatically separated into sections and by type.
- repo: https://github.com/timothycrosley/isort
rev: 5.12.0
hooks:
- id: isort
args: [--line-length 110 --force-single-line-imports false --profile=black --filter-files --multi-line 3 --lines-after-imports 2 --lines-between-types 1 --use-parentheses true ]
files: \.py$
# mypy checks type annotations.
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.6.1
hooks:
- id: mypy
args: [--config-file=pyproject.toml]
# pre-commit-hooks is a collection of Git hooks for code quality, formatting, and analysis.
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-toml
- id: end-of-file-fixer
exclude: ^tests/.*/fixtures/.*
- id: trailing-whitespace
exclude: ^proto/zkp_auth.proto$
# pyupgrade automatically upgrades Python code for improved compatibility and maintainability.
- repo: https://github.com/asottile/pyupgrade
rev: v3.7.0
hooks:
- id: pyupgrade
args:
- --py311-plus