-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
43 lines (40 loc) · 1.27 KB
/
.pre-commit-config.yaml
File metadata and controls
43 lines (40 loc) · 1.27 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:
# Import sorting
- repo: https://github.com/pycqa/isort
rev: 7.0.0
hooks:
- id: isort
args: [--profile=black, --line-length=88]
# Linting and code quality (Ruff replaces Black for formatting)
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.5
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
# Ruff format is compatible with Black formatting style
# Basic file checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-merge-conflict
- id: check-added-large-files
- id: check-ast
- id: check-json
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-docstring-first
- id: check-case-conflict
# Run tests (formatting and linting are handled by individual hooks above)
- repo: local
hooks:
- id: run-checks-test
name: run-checks-test
entry: bash -c 'if [ -d ".venv" ]; then bash scripts/run-checks.sh --test; else echo "⚠️ Virtual environment not found. Run uv sync first."; exit 1; fi'
language: system
pass_filenames: false
always_run: true
stages: [pre-commit]