fix(lint): pin ruff version, add pre-commit hook, fix all lint errors
Some checks failed
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>
This commit is contained in:
@@ -29,15 +29,9 @@ repos:
|
||||
- id: check-merge-conflict
|
||||
- id: debug-statements
|
||||
|
||||
# Python formatting (optional - uncomment if you want)
|
||||
# - repo: https://github.com/psf/black
|
||||
# rev: 23.12.1
|
||||
# hooks:
|
||||
# - id: black
|
||||
# language_version: python3
|
||||
|
||||
# Python import sorting (optional)
|
||||
# - repo: https://github.com/pycqa/isort
|
||||
# rev: 5.13.2
|
||||
# hooks:
|
||||
# - id: isort
|
||||
# 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]
|
||||
|
||||
Reference in New Issue
Block a user