-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
36 lines (32 loc) · 1.54 KB
/
.pre-commit-config.yaml
File metadata and controls
36 lines (32 loc) · 1.54 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
repos:
# Note: black removed from pre-commit to avoid conflicts with ruff --fix
# Run `uv run black .` manually before committing if needed
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.0
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
types: [python]
- repo: local
hooks:
- id: pytest-check
name: Run last failed tests (fast feedback)
entry: bash -c 'if [ -f venv/bin/activate ]; then source venv/bin/activate && pytest --lf -x; elif [ -f .venv/bin/activate ]; then source .venv/bin/activate && pytest --lf -x; else pytest --lf -x; fi'
language: system
pass_filenames: false
files: \.py$
types: [python]
- id: coverage-check
name: Enforce 65% coverage (manual - use scripts/verify-ai-claims.sh for full check)
entry: bash -c 'if [ -f venv/bin/activate ]; then source venv/bin/activate && pytest --cov --cov-report=term-missing --cov-fail-under=65; elif [ -f .venv/bin/activate ]; then source .venv/bin/activate && pytest --cov --cov-report=term-missing --cov-fail-under=65; else pytest --cov --cov-report=term-missing --cov-fail-under=65; fi || (echo "❌❌❌ COVERAGE BELOW 65% ❌❌❌" && exit 1)'
language: system
pass_filenames: false
files: \.py$
types: [python]
stages: [manual]
- id: skip-detector
name: Detect skip decorator abuse
entry: python scripts/detect-skip-abuse.py
language: system
files: ^tests/.*\.py$
pass_filenames: false