-
Notifications
You must be signed in to change notification settings - Fork 15
/
.pre-commit-config.yaml
32 lines (29 loc) · 1.03 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
repos:
- repo: https://github.com/ambv/black
rev: 24.3.0
hooks:
- id: black
language_version: python3.9
files: (backend|metrics_exporter|fixtures)/.+\.py
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: [--settings-path=pyproject.toml]
files: (backend|metrics_exporter|fixtures)/.+\.py
- repo: https://github.com/pycqa/flake8
rev: 7.0.0
hooks:
- id: flake8
files: (backend|metrics_exporter|fixtures)/.+\.py
# Checked-in Python files will be passed as positional arguments. Flake8 will always lint explicitly passed
# arguments (the exclude section in Flake8 config file has no effect). Hence, we use pre-commit’s exclude
# to exclude files.
exclude: backend/orchestrator/.+_pb2(_grpc)?\.py|backend/substrapp/tests/assets\.py
additional_dependencies:
- pep8-naming
- repo: https://github.com/PyCQA/bandit
rev: 1.7.7
hooks:
- id: bandit
args: [--ini=.bandit, -q]