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

@@ -12,7 +12,7 @@ from pathlib import Path
# Add project root to path
sys.path.insert(0, str(Path(__file__).parent.parent))
from datetime import datetime, timezone
from datetime import UTC, datetime
from sqlalchemy.orm import Session
@@ -65,7 +65,7 @@ def create_landing_page(
if content:
existing.content = content
existing.is_published = True
existing.updated_at = datetime.now(timezone.utc)
existing.updated_at = datetime.now(UTC)
db.commit()
print(f"✅ Updated landing page with template: {template}")
@@ -78,7 +78,7 @@ def create_landing_page(
content=content
or f"""
<h2>About {vendor.name}</h2>
<p>{vendor.description or 'Your trusted shopping destination for quality products.'}</p>
<p>{vendor.description or "Your trusted shopping destination for quality products."}</p>
<h3>Why Choose Us?</h3>
<ul>
@@ -95,7 +95,7 @@ def create_landing_page(
template=template,
meta_description=f"Shop at {vendor.name} for quality products and great service",
is_published=True,
published_at=datetime.now(timezone.utc),
published_at=datetime.now(UTC),
show_in_footer=False,
show_in_header=False,
display_order=0,
@@ -154,7 +154,7 @@ def list_vendors():
if landing:
print(f" Landing Page: ✅ ({landing.template})")
else:
print(f" Landing Page: ❌ None")
print(" Landing Page: ❌ None")
print()
finally:
@@ -220,8 +220,8 @@ if __name__ == "__main__":
if success:
print("\n✅ SUCCESS! Landing page is ready.")
print("\n💡 Try different templates:")
print(f" python scripts/create_landing_page.py")
print(f" # Then choose: minimal, modern, or full")
print(" python scripts/create_landing_page.py")
print(" # Then choose: minimal, modern, or full")
else:
print("\n❌ Failed to create landing page")
sys.exit(1)