diff --git a/run.py b/run.py index 3d58022..22e07cb 100644 --- a/run.py +++ b/run.py @@ -20,6 +20,7 @@ along with this program. If not, see . import asyncio import sys from multiprocessing.managers import BaseManager +from typing import Dict, Tuple, List import asyncpg import logbook @@ -290,8 +291,8 @@ def init_app_managers(app_: Quart, *, init_voice=True): async def api_index(app_): - to_find = {} - found = [] + to_find: Dict[Tuple[str, str], str] = {} + found: List[str] = [] with open("discord_endpoints.txt") as fd: for line in fd.readlines(): @@ -325,17 +326,17 @@ async def api_index(app_): if pathname: found.append(pathname) - found = set(found) + found_set = set(found) api = set(to_find.values()) - missing = api - found + missing = api - found_set - percentage = (len(found) / len(api)) * 100 + percentage = (len(found_set) / len(api)) * 100 percentage = round(percentage, 2) log.debug( "API compliance: {} out of {} ({} missing), {}% compliant", - len(found), + len(found_set), len(api), len(missing), percentage,