used black

This commit is contained in:
hhh
2024-11-02 00:10:24 +02:00
parent 1b1f217b75
commit e0a3d256d5
79 changed files with 658 additions and 733 deletions

View File

@@ -1,6 +1,4 @@
from .search import get_youtube_search_results
__all__ = [
'get_youtube_search_results'
]
__all__ = ["get_youtube_search_results"]

View File

@@ -1,6 +1,4 @@
from aiogram.types import (
InlineQueryResultDocument, InlineQueryResultCachedAudio
)
from aiogram.types import InlineQueryResultDocument, InlineQueryResultCachedAudio
from bot.modules.youtube import youtube
from bot.modules.database import db
@@ -9,15 +7,12 @@ from bot.modules.settings import UserSettings
from ..common.search import get_common_search_result
async def get_youtube_search_results(query: str, settings: UserSettings) -> list[
InlineQueryResultDocument | InlineQueryResultCachedAudio
]:
async def get_youtube_search_results(
query: str, settings: UserSettings
) -> list[InlineQueryResultDocument | InlineQueryResultCachedAudio]:
return [
await get_common_search_result(
audio=audio,
db_table=db.youtube,
service_id='yt',
settings=settings
audio=audio, db_table=db.youtube, service_id="yt", settings=settings
)
for audio in youtube.songs.search(query, limit=40)
]