-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
38 lines (37 loc) · 1.34 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
38 lines (37 loc) · 1.34 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
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
# README showcase recordings are the intentional large source assets.
exclude: ^media/showcase/(warehouse-safety|g1_[a-z_]+)\.gif$
# Run the exact same pinned tools and source scope as CI. Run uv sync --locked --extra dev first.
- repo: local
hooks:
- id: black
name: black
entry: uv run --no-sync black --check src/cbfkit
language: system
pass_filenames: false
files: ^(src/cbfkit/|pyproject.toml)
- id: isort
name: isort
entry: uv run --no-sync isort --check-only src/cbfkit
language: system
pass_filenames: false
files: ^(src/cbfkit/|pyproject.toml)
- id: ruff
name: ruff
entry: uv run --no-sync ruff check src/cbfkit scripts tests/test_optimization tests/test_benchmarks
language: system
pass_filenames: false
files: ^(src/cbfkit/|scripts/|tests/test_optimization/|tests/test_benchmarks/|pyproject.toml)
- id: mypy
name: mypy
entry: uv run --no-sync mypy src/cbfkit
language: system
pass_filenames: false
files: ^(src/cbfkit/|mypy.ini|pyproject.toml)