Some checks failed
- Pin ruff==0.8.4 in requirements-dev.txt (was >=0.8.4, CI got newer version with different import sorting rules) - Add ruff to .pre-commit-config.yaml with --fix to auto-sort imports on commit (prevents PyCharm import reordering from reaching CI) - Fix I001 import sorting in 6 files - Fix F401 unused import (sqlalchemy.Numeric in subscription.py) - Fix noqa false positive in validate_architecture.py comment Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
38 lines
1.0 KiB
YAML
38 lines
1.0 KiB
YAML
# Pre-commit hooks configuration
|
|
# Install: pip install pre-commit
|
|
# Setup: pre-commit install
|
|
# Run manually: pre-commit run --all-files
|
|
|
|
repos:
|
|
# Architecture validation
|
|
- repo: local
|
|
hooks:
|
|
- id: validate-architecture
|
|
name: Validate Architecture Patterns
|
|
entry: python scripts/validate/validate_architecture.py
|
|
language: python
|
|
pass_filenames: false
|
|
always_run: true
|
|
additional_dependencies: [pyyaml]
|
|
verbose: true
|
|
|
|
# Python code quality
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v4.5.0
|
|
hooks:
|
|
- id: trailing-whitespace
|
|
- id: end-of-file-fixer
|
|
- id: check-yaml
|
|
- id: check-added-large-files
|
|
args: ['--maxkb=1000']
|
|
- id: check-json
|
|
- id: check-merge-conflict
|
|
- id: debug-statements
|
|
|
|
# Ruff - linting and import sorting (replaces black + isort)
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
rev: v0.8.4
|
|
hooks:
|
|
- id: ruff
|
|
args: [--fix, --exit-non-zero-on-fix]
|