-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
52 lines (48 loc) · 1.69 KB
/
.pre-commit-config.yaml
File metadata and controls
52 lines (48 loc) · 1.69 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
# Hooks
# Please note the hooks below are intended to be installed as a pre-push hook, e.g., specifying the --hook-type option:
# pre-commit install --hook-type pre-push
# Hooks can and should be customized for personal and project-specific settings.
# Checkin to the repository should be aligned with the other service maintainers.
---
default_language_version:
python: python3.12
default_stages: [pre-push]
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.8
hooks:
- id: ruff
name: Ruff Linter & Formatter
types_or: [python, pyi]
args: ["--fix"]
- id: ruff-format
name: Ruff Linter & Formatter
types_or: [python, pyi]
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.7.2
hooks:
- id: uv-lock
# keep the requirements.txt file updated
- id: uv-export
# Compile requirements
- id: pip-compile
args: [requirements-dev.in, -o, requirements-dev.txt]
files: ^requirements-dev\.(in|txt)$
# Use local hooks to tools installed via the environment-dev.yml.
# This should allow making the installed tool without pre-commit, e.g., integrated in the IDE or manually.
- repo: local
hooks:
- id: uv-pytoml-check
name: UV Pytoml Check
entry: uv pip check
language: system
types: [python]
pass_filenames: false
- id: uv-requirements-sync
name: UV Sync Dependencies
entry: uv pip compile pyproject.toml -o requirements.txt
language: system
types: [python]
pass_filenames: false