fix: tests and linters (ruff format)
This commit is contained in:
3 files changed
+3
-9
No files matched your search
@@ -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,)
|
||||
|
||||
@@ -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(),)
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user