-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
46 lines (42 loc) · 1.16 KB
/
.pre-commit-config.yaml
File metadata and controls
46 lines (42 loc) · 1.16 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
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.7
hooks:
- id: ruff
args: [--fix]
exclude: '(^dev/)|(\.ipynb$)'
- id: ruff-format
exclude: '(^dev/)|(\.ipynb$)'
- repo: local
hooks:
- id: mypy
name: mypy
entry: uv run -- mypy
args: ["."]
language: system
types: [python]
pass_filenames: false
require_serial: true
verbose: true
# Keep uv.lock up to date
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.8.22 # pin to your uv version
hooks:
- id: uv-lock
# Fail if uv.lock would change
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.8.22
hooks:
- id: uv-lock
args: ["--check"] # or "--locked"
# Export requirements
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.8.22
hooks:
- id: uv-export
args:
- "--format=requirements.txt"
- "--all-groups" # or: "--group=dev"
- "--no-hashes"
- "--output-file=requirements.txt"
- "--frozen" # don’t re-lock during export