-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
63 lines (54 loc) · 1.57 KB
/
.pre-commit-config.yaml
File metadata and controls
63 lines (54 loc) · 1.57 KB
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
exclude: '^scripts/|^docs/|^build/|^tests/|^dist/|^venv/|\.venv/|\.egg-info/|\.tox/|\.mypy_cache/|\.mjml_cache/|\.pytest_cache/|\.coverage$'
default_stages: [pre-commit]
default_language_version:
python: python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: mixed-line-ending
- id: debug-statements
- id: detect-private-key
- id: check-docstring-first
- id: check-merge-conflict
- id: check-case-conflict
- id: check-added-large-files
args: ['--maxkb=500']
- id: check-json
- id: check-toml
- id: check-yaml
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
files: ^src/.*\.py$
args: ['--line-length=120']
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
files: ^src/.*\.py$
args: ['--profile', 'black', '--line-length', '120']
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.19.1
hooks:
- id: mypy
files: ^src/.*\.py$
additional_dependencies: [
'sqlalchemy[mypy]',
]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.0
hooks:
- id: ruff-check
files: ^src/.*\.py$
args: [--fix, --ignore=I]
- repo: https://github.com/PyCQA/bandit
rev: 1.9.3
hooks:
- id: bandit
files: ^src/.*\.py$
args: ['-c', 'pyproject.toml', '-r', '.']
additional_dependencies: ['bandit[toml]']