Migrate to hatchling instead of poetry, ruff instead of flake8

This commit is contained in:
Alex Root Junior 2023-01-08 21:33:20 +02:00
parent 04ccb390d5
commit c62a450253
No known key found for this signature in database
GPG key ID: 074C1D455EBEA4AC
48 changed files with 452 additions and 2772 deletions

View file

@ -2,7 +2,6 @@ from os import getenv
from typing import Any, Dict, Union
from aiohttp import web
from finite_state_machine import form_router
from aiogram import Bot, Dispatcher, F, Router
from aiogram.client.session.aiohttp import AiohttpSession
@ -16,6 +15,7 @@ from aiogram.webhook.aiohttp_server import (
TokenBasedRequestHandler,
setup_application,
)
from finite_state_machine import form_router
main_router = Router()
@ -48,7 +48,7 @@ async def command_add_bot(message: Message, command: CommandObject, bot: Bot) ->
return message.answer("Invalid token")
await new_bot.delete_webhook(drop_pending_updates=True)
await new_bot.set_webhook(OTHER_BOTS_URL.format(bot_token=command.args))
await message.answer(f"Bot @{bot_user.username} successful added")
return await message.answer(f"Bot @{bot_user.username} successful added")
async def on_startup(dispatcher: Dispatcher, bot: Bot):