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,42 +1,34 @@
from aiogram.utils.keyboard import (InlineKeyboardMarkup, InlineKeyboardButton,
InlineKeyboardBuilder)
from aiogram.utils.keyboard import (
InlineKeyboardMarkup,
InlineKeyboardButton,
InlineKeyboardBuilder,
)
deezer = {
'd': '🎵 Search in Deezer'
}
soundcloud = {
'c': '☁️ Search in SoundCloud'
}
youtube = {
'y': '▶️ Search in YouTube'
}
spotify = {
's': '🎧 Search in Spotify'
}
deezer = {"d": "🎵 Search in Deezer"}
soundcloud = {"c": "☁️ Search in SoundCloud"}
youtube = {"y": "▶️ Search in YouTube"}
spotify = {"s": "🎧 Search in Spotify"}
def get_search_variants(
query: str,
services: dict[str, str],
query: str,
services: dict[str, str],
) -> list[list[InlineKeyboardButton]]:
buttons = [
[
InlineKeyboardButton(
text=services[key],
switch_inline_query_current_chat=f'{key}:{query}'
text=services[key], switch_inline_query_current_chat=f"{key}:{query}"
)
] for key in services.keys()
]
for key in services.keys()
]
return buttons
def get_search_variants_kb(
query: str,
services: dict[str, str],
query: str,
services: dict[str, str],
) -> InlineKeyboardMarkup:
return InlineKeyboardBuilder(get_search_variants(
query,
services
)).as_markup()
return InlineKeyboardBuilder(get_search_variants(query, services)).as_markup()