fix type hinting

This commit is contained in:
codey 2024-11-14 19:22:43 -05:00
parent 4500bab91d
commit b33470a412

View File

@ -39,7 +39,7 @@ class KarmaDB:
def __init__(self):
self.db_path = os.path.join("/", "var", "lib", "singerdbs", "karma.db")
async def get_karma(self, keyword: str) -> str | int:
async def get_karma(self, keyword: str) -> int | dict:
async with sqlite3.connect(self.db_path, timeout=2) as db_conn:
async with db_conn.execute("SELECT score FROM karma WHERE keyword = ? LIMIT 1", (keyword,)) as db_cursor:
try: