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:
@@ -26,7 +26,7 @@ Usage:
|
||||
"""
|
||||
|
||||
import sys
|
||||
from datetime import datetime, timezone
|
||||
from datetime import UTC, datetime
|
||||
from pathlib import Path
|
||||
|
||||
# Add project root to path
|
||||
@@ -496,12 +496,12 @@ def create_default_pages(db: Session) -> None:
|
||||
meta_description=page_data["meta_description"],
|
||||
meta_keywords=page_data["meta_keywords"],
|
||||
is_published=True,
|
||||
published_at=datetime.now(timezone.utc),
|
||||
published_at=datetime.now(UTC),
|
||||
show_in_footer=page_data["show_in_footer"],
|
||||
show_in_header=page_data.get("show_in_header", False),
|
||||
display_order=page_data["display_order"],
|
||||
created_at=datetime.now(timezone.utc),
|
||||
updated_at=datetime.now(timezone.utc),
|
||||
created_at=datetime.now(UTC),
|
||||
updated_at=datetime.now(UTC),
|
||||
)
|
||||
|
||||
db.add(page)
|
||||
@@ -511,7 +511,7 @@ def create_default_pages(db: Session) -> None:
|
||||
db.commit()
|
||||
|
||||
print("\n" + "=" * 70)
|
||||
print(f"Summary:")
|
||||
print("Summary:")
|
||||
print(f" Created: {created_count} pages")
|
||||
print(f" Skipped: {skipped_count} pages (already exist)")
|
||||
print(f" Total: {created_count + skipped_count} pages")
|
||||
|
||||
Reference in New Issue
Block a user