Run: black and isort

This commit is contained in:
2025-10-05 02:28:47 +02:00
parent bd3e23da07
commit 6e9f8a0589
12 changed files with 222 additions and 189 deletions

View File

@@ -1,5 +1,6 @@
import logging
from typing import Dict, Any
from typing import Any, Dict
from .interface import DatabaseInterface
from .sqlite_db import SQLiteDatabase
@@ -11,18 +12,18 @@ class DatabaseFactory:
@staticmethod
def create_database(db_type: str, config: Dict[str, Any]) -> DatabaseInterface:
if db_type.lower() == 'sqlite':
if 'path' not in config:
if db_type.lower() == "sqlite":
if "path" not in config:
raise ValueError("SQLite configuration requires 'path'")
return SQLiteDatabase(config['path'])
return SQLiteDatabase(config["path"])
elif db_type.lower() == 'mysql':
elif db_type.lower() == "mysql":
# Für später: MySQL-Implementierung
# from .mysql_db import MySQLDatabase
# return MySQLDatabase(config)
raise NotImplementedError("MySQL support not yet implemented")
elif db_type.lower() == 'postgresql':
elif db_type.lower() == "postgresql":
# Für später: PostgreSQL-Implementierung
# from .postgresql_db import PostgreSQLDatabase
# return PostgreSQLDatabase(config)