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:
@@ -2,9 +2,9 @@
|
||||
"""Database backup utility that uses project configuration."""
|
||||
|
||||
import os
|
||||
import sys
|
||||
import shutil
|
||||
import sqlite3
|
||||
import sys
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
from urllib.parse import urlparse
|
||||
@@ -19,10 +19,10 @@ def get_database_path():
|
||||
"""Extract database path from DATABASE_URL."""
|
||||
db_url = settings.database_url
|
||||
|
||||
if db_url.startswith('sqlite:///'):
|
||||
if db_url.startswith("sqlite:///"):
|
||||
# Remove sqlite:/// prefix and handle relative paths
|
||||
db_path = db_url.replace('sqlite:///', '')
|
||||
if db_path.startswith('./'):
|
||||
db_path = db_url.replace("sqlite:///", "")
|
||||
if db_path.startswith("./"):
|
||||
db_path = db_path[2:] # Remove ./ prefix
|
||||
return db_path
|
||||
else:
|
||||
@@ -76,7 +76,7 @@ def backup_database():
|
||||
print("[BACKUP] Starting database backup...")
|
||||
print(f"[INFO] Database URL: {settings.database_url}")
|
||||
|
||||
if settings.database_url.startswith('sqlite'):
|
||||
if settings.database_url.startswith("sqlite"):
|
||||
return backup_sqlite_database()
|
||||
else:
|
||||
print("[INFO] For PostgreSQL databases, use pg_dump:")
|
||||
|
||||
Reference in New Issue
Block a user