diff --git a/zyrarbot/storage/adapters/postgres/database.py b/zyrarbot/storage/adapters/postgres/database.py index 0014453..d787ca1 100644 --- a/zyrarbot/storage/adapters/postgres/database.py +++ b/zyrarbot/storage/adapters/postgres/database.py @@ -124,9 +124,7 @@ def _upsert_guild( connection.execute(f"UPDATE guilds SET {field}=%s WHERE id=%s", (value, guild_id)) -def _import_history( - connection: psycopg.Connection[Any], guild_id: int, entries: list[Any] -) -> None: +def _import_history(connection: psycopg.Connection[Any], guild_id: int, entries: list[Any]) -> None: _ensure_guild(connection, guild_id) if connection.execute( "SELECT 1 FROM history_entries WHERE guild_id=%s LIMIT 1", (guild_id,) diff --git a/zyrarbot/storage/adapters/postgres/migrations/__init__.py b/zyrarbot/storage/adapters/postgres/migrations/__init__.py index 6254bee..b1f565a 100644 --- a/zyrarbot/storage/adapters/postgres/migrations/__init__.py +++ b/zyrarbot/storage/adapters/postgres/migrations/__init__.py @@ -2,8 +2,6 @@ from importlib import import_module -InitialSchemaMigration = import_module( - ".0001_initial_schema", __name__ -).InitialSchemaMigration +InitialSchemaMigration = import_module(".0001_initial_schema", __name__).InitialSchemaMigration MIGRATIONS = (InitialSchemaMigration(),) diff --git a/zyrarbot/storage/adapters/postgres/persistence.py b/zyrarbot/storage/adapters/postgres/persistence.py index 309c4f0..abc1a62 100644 --- a/zyrarbot/storage/adapters/postgres/persistence.py +++ b/zyrarbot/storage/adapters/postgres/persistence.py @@ -25,9 +25,7 @@ class PostgresPersistence: self.config: GuildConfigRepository = PostgresGuildConfig( self.database, fallback_plays=default_plays ) - self.history: HistoryRepository = PostgresHistory( - self.database, limit=history_limit - ) + self.history: HistoryRepository = PostgresHistory(self.database, limit=history_limit) self.queues: QueueRepository = PostgresQueue(self.database) self._config_dir = config_dir