style: apply black and isort formatting across entire codebase

- Standardize quote style (single to double quotes)
- Reorder and group imports alphabetically
- Fix line breaks and indentation for consistency
- Apply PEP 8 formatting standards

Also updated Makefile to exclude both venv and .venv from code quality checks.

🤖 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:30:17 +01:00
parent 13f0094743
commit 21c13ca39b
236 changed files with 8450 additions and 6545 deletions

View File

@@ -26,20 +26,19 @@ Usage:
"""
import sys
from pathlib import Path
from datetime import datetime, timezone
from pathlib import Path
# Add project root to path
project_root = Path(__file__).parent.parent
sys.path.insert(0, str(project_root))
from sqlalchemy.orm import Session
from sqlalchemy import select
from sqlalchemy.orm import Session
from app.core.database import SessionLocal
from models.database.content_page import ContentPage
# ============================================================================
# DEFAULT PAGE CONTENT
# ============================================================================
@@ -458,6 +457,7 @@ DEFAULT_PAGES = [
# SCRIPT FUNCTIONS
# ============================================================================
def create_default_pages(db: Session) -> None:
"""
Create default platform content pages.
@@ -475,13 +475,14 @@ def create_default_pages(db: Session) -> None:
# Check if page already exists (platform default with this slug)
existing = db.execute(
select(ContentPage).where(
ContentPage.vendor_id == None,
ContentPage.slug == page_data["slug"]
ContentPage.vendor_id == None, ContentPage.slug == page_data["slug"]
)
).scalar_one_or_none()
if existing:
print(f" ⏭️ Skipped: {page_data['title']} (/{page_data['slug']}) - already exists")
print(
f" ⏭️ Skipped: {page_data['title']} (/{page_data['slug']}) - already exists"
)
skipped_count += 1
continue
@@ -519,7 +520,9 @@ def create_default_pages(db: Session) -> None:
if created_count > 0:
print("✅ Default platform content pages created successfully!\n")
print("Next steps:")
print(" 1. View pages at: /about, /contact, /faq, /shipping, /returns, /privacy, /terms")
print(
" 1. View pages at: /about, /contact, /faq, /shipping, /returns, /privacy, /terms"
)
print(" 2. Vendors can override these pages through the vendor dashboard")
print(" 3. Edit platform defaults through the admin panel\n")
else:
@@ -530,6 +533,7 @@ def create_default_pages(db: Session) -> None:
# MAIN EXECUTION
# ============================================================================
def main():
"""Main execution function."""
print("\n🚀 Starting Default Content Pages Creation Script...\n")