-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
69 lines (68 loc) · 1.93 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
58
59
60
61
62
63
64
65
66
67
68
69
ci:
skip: [fmt, mypy]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.14.1
hooks:
- id: mypy
additional_dependencies:
[
argon2-cffi,
asyncpg,
"camel-converter[pydantic]",
faker,
fastapi,
meilisearch-python-sdk,
passlib,
polars,
pydantic,
pydantic-settings,
pyjwt,
python-dotenv,
rich,
srsly,
typer,
"uvicorn[standard]",
]
exclude: ".*/test_.*\\.py|.*/conftest\\.py|src/rest_api_postgres/python/.*|src/pyp3_mock_data/.*|src/pyo3_mock_data/.*"
args: [--explicit-package-bases] # This is because of the mono repo type setup
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.14.1
hooks:
- id: mypy
pass_filenames: false
files: ^src/rest_api_postgres/python/
additional_dependencies:
[
asyncpg,
"camel-converter[pydantic]",
fastapi,
pydantic,
pydantic-settings,
"uvicorn[standard]",
]
entry: bash -c 'cd src/rest_api_postgres/python && mypy -p app "$@"' --
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.14.1
hooks:
- id: mypy
pass_filenames: false
files: ^src/pyp3_mock_data/
entry: bash -c 'cd src/pyo3_mock_data && mypy -p pyp3_mock_data "$@"' --
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.2
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
hooks:
- id: fmt