refactor: modernize code quality tooling with Ruff

- Replace black, isort, and flake8 with Ruff (all-in-one linter and formatter)
- Add comprehensive pyproject.toml configuration
- Simplify Makefile code quality targets
- Configure exclusions for venv/.venv in pyproject.toml
- Auto-fix 1,359 linting issues across codebase

Benefits:
- Much faster builds (Ruff is written in Rust)
- Single tool replaces multiple tools
- More comprehensive rule set (UP, B, C4, SIM, PIE, RET, Q)
- All configuration centralized in pyproject.toml
- Better import sorting and formatting consistency

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-28 19:37:38 +01:00
parent 21c13ca39b
commit 238c1ec9b8
169 changed files with 2183 additions and 1784 deletions

View File

@@ -5,10 +5,10 @@ import os
import sys
from urllib.parse import urlparse
from alembic.config import Config
from sqlalchemy import create_engine, text
from alembic import command
from alembic.config import Config
# Add project root to Python path
sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))
@@ -28,8 +28,7 @@ def get_database_info():
if db_path.startswith("./"):
db_path = db_path[2:]
return db_type, db_path
else:
return db_type, None
return db_type, None
def verify_database_setup():
@@ -138,7 +137,7 @@ def verify_model_structure():
try:
from models.database.base import Base
print(f"[OK] Database Base imported")
print("[OK] Database Base imported")
print(
f"[INFO] Found {len(Base.metadata.tables)} database tables: {list(Base.metadata.tables.keys())}"
)
@@ -191,7 +190,7 @@ def verify_model_structure():
def check_project_structure():
"""Check overall project structure."""
print(f"\n[STRUCTURE] Checking project structure...")
print("\n[STRUCTURE] Checking project structure...")
critical_paths = [
"models/database/base.py",
@@ -216,7 +215,7 @@ def check_project_structure():
"models/api/__init__.py",
]
print(f"\n[INIT] Checking __init__.py files...")
print("\n[INIT] Checking __init__.py files...")
for init_file in init_files:
if os.path.exists(init_file):
print(f" * {init_file}")