-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
43 lines (39 loc) · 1.3 KB
/
.pre-commit-config.yaml
File metadata and controls
43 lines (39 loc) · 1.3 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
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.9 # Ruff version
hooks:
- id: ruff # Run the linter.
name: Run Linter Check (Ruff)
args: [ --fix, --unsafe-fixes ]
files: ^(instructor|tests|examples)/
- id: ruff-format # Run the formatter.
name: Run Formatter (Ruff)
- repo: local
hooks:
- id: uv-lock-check
name: Check uv.lock is up-to-date
entry: uv
args: [lock, --check]
language: system
files: ^(pyproject\.toml|uv\.lock)$
pass_filenames: false
- id: uv-sync-check
name: Verify dependencies can be installed
entry: uv
args: [sync, --check, --all-extras]
language: system
files: ^(pyproject\.toml|uv\.lock)$
pass_filenames: false
- id: uv-export-requirements
name: Export requirements.txt from pyproject.toml
entry: bash -c 'uv pip compile pyproject.toml -o requirements.txt && git add requirements.txt'
language: system
files: ^pyproject\.toml$
pass_filenames: false
- id: ty-check
name: Run Type Check (ty)
entry: uv
args: [run, --frozen, ty, check, instructor/]
language: system
files: ^instructor/
pass_filenames: false