40 lines
1019 B
YAML
40 lines
1019 B
YAML
|
|
default_language_version:
|
||
|
|
python: python3.12
|
||
|
|
|
||
|
|
repos:
|
||
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||
|
|
rev: v4.6.0
|
||
|
|
hooks:
|
||
|
|
- id: trailing-whitespace
|
||
|
|
- id: end-of-file-fixer
|
||
|
|
- id: check-yaml
|
||
|
|
args: [--allow-multiple-documents]
|
||
|
|
- id: check-json
|
||
|
|
- id: check-merge-conflict
|
||
|
|
- id: check-added-large-files
|
||
|
|
args: [--maxkb=6000]
|
||
|
|
- id: detect-private-key
|
||
|
|
|
||
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||
|
|
rev: v0.6.9
|
||
|
|
hooks:
|
||
|
|
# Ruff lints and sorts imports; formatting is left to black so there is
|
||
|
|
# exactly one formatter in the toolchain.
|
||
|
|
- id: ruff
|
||
|
|
args: [--fix]
|
||
|
|
files: ^backend/
|
||
|
|
|
||
|
|
- repo: https://github.com/psf/black
|
||
|
|
rev: 24.10.0
|
||
|
|
hooks:
|
||
|
|
- id: black
|
||
|
|
files: ^backend/
|
||
|
|
|
||
|
|
- repo: https://github.com/PyCQA/bandit
|
||
|
|
rev: 1.7.10
|
||
|
|
hooks:
|
||
|
|
- id: bandit
|
||
|
|
args: [-q, -c, backend/pyproject.toml]
|
||
|
|
files: ^backend/apps/
|
||
|
|
additional_dependencies: ["bandit[toml]"]
|