-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
81 lines (75 loc) · 2.63 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
81 lines (75 loc) · 2.63 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# .pre-commit-config.yaml
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-json
- id: check-toml
- id: detect-private-key
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 25.9.0
hooks:
- id: black
language_version: python3.9
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.3
hooks:
- id: ruff-check
types_or: [ python, pyi ]
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.18.2
hooks:
- id: mypy
# FIX: Trigger the hook if any Python file is changed.
files: \.py$
# FIX: Tell the hook to run once, without passing filenames.
# This forces mypy to scan the whole project as configured.
pass_filenames: false
args: ["allos/", "tests/"]
# Mypy needs access to our project's dependencies to find their types.
# We install them directly into its isolated environment.
additional_dependencies:
# --- Core Dependencies ---
- "pydantic>=2.0"
- "httpx>=0.25"
- "rich>=13.0"
- "click>=8.0"
- "pyyaml>=6.0"
- "tiktoken>=0.5"
# --- Provider Dependencies ---
- "openai>=1.10.0"
- "anthropic>=0.20.0"
# --- Stubs for untyped libraries ---
- "types-PyYAML"
# --- Dev Dependencies Mypy might need ---
- "pytest"
- "pytest-mock"
- repo: https://github.com/astral-sh/uv-pre-commit
# uv version.
rev: 0.9.7
hooks:
# This hook synchronizes your virtual environment with uv.lock if you use it.
# It can be slow, so it's often better to run `uv sync` manually.
# We can keep it commented out for now.
# - id: uv-lock
# FIX: Use uv-pip-compile to update lockfiles from pyproject.toml
- id: pip-compile
name: uv pip compile -o requirements.txt
# This will run if pyproject.toml or requirements.txt changes.
files: ^(pyproject\.toml|requirements\.txt)$
args:
- pyproject.toml
- --output-file=requirements.txt
- id: pip-compile
name: uv pip compile --all-extras -o requirements-dev.txt
# This will run if pyproject.toml or requirements-dev.txt changes.
files: ^(pyproject\.toml|requirements-dev\.txt)$
args:
- pyproject.toml
- --all-extras
- --output-file=requirements-dev.txt