diff --git a/bot/callbacks/full_menu.py b/bot/callbacks/full_menu.py index be8b368..3164086 100644 --- a/bot/callbacks/full_menu.py +++ b/bot/callbacks/full_menu.py @@ -1,12 +1,13 @@ -from aiogram import Router, Bot, F +from aiogram import Router, F from aiogram.types import ( CallbackQuery ) + from .factories.full_menu import FullMenuCallback router = Router() @router.callback_query(FullMenuCallback.filter(F.action == 'settings')) -async def on_close(callback_query: CallbackQuery, bot: Bot): +async def on_close(callback_query: CallbackQuery): await callback_query.answer('Settings are not available yet') diff --git a/bot/handlers/inline_empty/on_inline_empty.py b/bot/handlers/inline_empty/on_inline_empty.py index 5d420ad..f745e2f 100644 --- a/bot/handlers/inline_empty/on_inline_empty.py +++ b/bot/handlers/inline_empty/on_inline_empty.py @@ -1,14 +1,15 @@ -from aiogram import Router, Bot, F +from aiogram import Router, F from aiogram.types import ( InlineQuery, InputTextMessageContent, InlineQueryResultArticle ) + from bot.keyboards.inline.full_menu import get_full_menu_kb router = Router() @router.inline_query(F.query == '') -async def empty_inline_query(inline_query: InlineQuery, bot: Bot): +async def empty_inline_query(inline_query: InlineQuery): await inline_query.answer( [ InlineQueryResultArticle( diff --git a/bot/modules/error/pretty.py b/bot/modules/error/pretty.py index d4e3cfd..a65337a 100644 --- a/bot/modules/error/pretty.py +++ b/bot/modules/error/pretty.py @@ -2,10 +2,11 @@ import os import traceback import contextlib import re +from typing import Type class PrettyException: - def __init__(self, e: Exception): + def __init__(self, e: Type[BaseException] | Exception): self.long = f""" 😍 {e.__class__.__name__} 👉 {"".join(traceback.format_exception_only(e)).strip()} diff --git a/bot/modules/fsm/in_db.py b/bot/modules/fsm/in_db.py index 61b1eed..ba07ce8 100644 --- a/bot/modules/fsm/in_db.py +++ b/bot/modules/fsm/in_db.py @@ -17,7 +17,7 @@ class MemoryStorageRecord: class StorageDict(DefaultDict): - def __init__(self, default_factory=None, **kwargs) -> None: + def __init__(self, default_factory=None) -> None: if type(db.fsm.get('fsm')) is not dict: db.fsm['fsm'] = dict() diff --git a/pyproject.toml b/pyproject.toml index 77d478a..fe351f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ shazamio = { path = "lib/ShazamIO" } sqlitedict = "^2.1.0" spotipy = "^2.23.0" attrs = "^23.1.0" -ytmusicapi = "^1.3.0" +ytmusicapi = "^1.3.1" pytube = "^15.0.0" pydub = "^0.25.1" aiohttp = "^3.8.6"