-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
49 lines (44 loc) · 1.52 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.23
hooks:
- id: validate-pyproject
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.9
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/python-poetry/poetry
rev: '2.0.0' # Must be updated manually (see https://python-poetry.org/docs/pre-commit-hooks/#why-does-pre-commit-autoupdate-not-update-to-the-latest-version
hooks:
# TODO: Uncomment when dependabot uses poetry 2.x.x. See https://github.com/dependabot/dependabot-core/issues/11237
# - id: poetry-check
- id: poetry-lock
- id: poetry-install
- repo: https://github.com/PyCQA/bandit
rev: 1.8.3
hooks:
- id: bandit
args: ["-c", "pyproject.toml", "-r", "src", "tests"]
additional_dependencies: ["bandit[toml]"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.15.0'
hooks:
- id: mypy
pass_filenames: false # Pass all files in the repository except those excluded in pyproject.toml
args:
- '.' # Check all files in the repository
- "--config-file=pyproject.toml"
additional_dependencies:
- 'pydantic'
- 'fastapi'
- 'pytest'
- 'types-PyYAML'