Apply ruff linting fixes to Alembic environment

This commit is contained in:
Automated Action 2025-05-16 06:59:33 +00:00
parent 74c77ba3ea
commit a4cc5dbcca

View File

@ -55,7 +55,7 @@ if db_url.startswith("sqlite:///"):
conn = sqlite3.connect(db_path)
conn.execute("SELECT 1")
conn.close()
logger.info(f"Successfully connected to SQLite database")
logger.info("Successfully connected to SQLite database")
except Exception as e:
logger.error(f"Direct SQLite connection failed: {e}")
except Exception as e:
@ -185,19 +185,19 @@ def run_migrations_online():
if os.path.exists(db_dir):
stats = os.stat(db_dir)
logger.error(f"DB directory permissions: {oct(stats.st_mode)}")
logger.error(f"DB directory exists: Yes")
logger.error("DB directory exists: Yes")
logger.error(f"DB directory is writable: {os.access(db_dir, os.W_OK)}")
else:
logger.error(f"DB directory exists: No")
logger.error("DB directory exists: No")
# File permissions if file exists
if os.path.exists(db_path):
stats = os.stat(db_path)
logger.error(f"DB file permissions: {oct(stats.st_mode)}")
logger.error(f"DB file exists: Yes")
logger.error("DB file exists: Yes")
logger.error(f"DB file is writable: {os.access(db_path, os.W_OK)}")
else:
logger.error(f"DB file exists: No")
logger.error("DB file exists: No")
# Re-raise the error
raise