From cc5928c1d50d2e1f0f9ff00654767b599b882809 Mon Sep 17 00:00:00 2001 From: iiTzArcur Date: Sat, 30 Nov 2024 11:18:20 +0100 Subject: [PATCH] add typedef --- multialive/multialive.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/multialive/multialive.py b/multialive/multialive.py index 7c20327..10b3476 100644 --- a/multialive/multialive.py +++ b/multialive/multialive.py @@ -69,7 +69,7 @@ async def gather_seeding(mainDb, group_id: str) -> dict[str, dict[str, str]]: async def update_seeding( mainDb, group_id: str, used_seeders: dict[str, dict[str, str]] -): +) -> None: serverManagerDB = mainDb.get_database("serverManager") seeding_db: AsyncIOMotorCollection = serverManagerDB.get_collection("seeding") await seeding_db.update_one( @@ -77,7 +77,7 @@ async def update_seeding( ) -async def get_seeding_groups(mainDb): +async def get_seeding_groups(mainDb) -> list[dict]: groups = [] serverManagerDB = mainDb.get_database("serverManager") seeding_db: AsyncIOMotorCollection = serverManagerDB.get_collection("seeding") @@ -86,7 +86,9 @@ async def get_seeding_groups(mainDb): return groups -async def update_server(mainDb, servers: list[str], group_id: str, empty_space: int): +async def update_server( + mainDb, servers: list[str], group_id: str, empty_space: int +) -> tuple[dict[str, dict[str, str]], dict[str, dict[str, str | bool]]]: used_seeders = await gather_seeding(mainDb, group_id) server_infos: dict[str, ServerInfo] = {}