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,5 +1,6 @@
from aiogram.types import (
InlineQueryResultArticle, InputTextMessageContent,
InlineQueryResultArticle,
InputTextMessageContent,
)
from bot.modules.database import db
@@ -8,24 +9,27 @@ from bot.modules.error import Error
from bot.common import console
async def get_error_search_results(error_id: str) -> (list[InlineQueryResultArticle]
| None):
async def get_error_search_results(
error_id: str,
) -> list[InlineQueryResultArticle] | None:
error: Error = db.errors.get(error_id)
if error is None:
return []
console.print(f'{error_id} requested')
console.print(f"{error_id} requested")
console.print(error.traceback)
console.print(f'-{error_id} requested-')
console.print(f"-{error_id} requested-")
return [(
InlineQueryResultArticle(
id=error_id,
title=f'Error {error_id}',
description=error.exception.short,
input_message_content=InputTextMessageContent(
message_text=error.exception.long,
parse_mode='HTML',
),
return [
(
InlineQueryResultArticle(
id=error_id,
title=f"Error {error_id}",
description=error.exception.short,
input_message_content=InputTextMessageContent(
message_text=error.exception.long,
parse_mode="HTML",
),
)
)
)]
]