Refactor imports

This commit is contained in:
LoRiot 2022-10-21 21:06:37 +03:00
parent 8f77438b7d
commit 7e1bcd40a7

6
bot.py
View file

@ -1,11 +1,11 @@
#!/usr/bin/python #!/usr/bin/python
import logging import logging
import os import os
import asyncio import asyncio
from aiogram import Bot, Dispatcher from aiogram import Bot, Dispatcher
from aiogram.contrib.fsm_storage.memory import MemoryStorage from aiogram.contrib.fsm_storage.memory import MemoryStorage
import asyncpg from asyncpg import create_pool
from middlewares.db import DbMiddleware from middlewares.db import DbMiddleware
from handlers.commands import register_command_handlers from handlers.commands import register_command_handlers
@ -23,7 +23,7 @@ async def main():
DB_PASS = os.getenv("DB_PASS") DB_PASS = os.getenv("DB_PASS")
DB_NAME = os.getenv("DB_NAME") DB_NAME = os.getenv("DB_NAME")
pool = await asyncpg.create_pool( pool = await create_pool(
f"postgresql://{DB_USER}:{DB_PASS}@{DB_HOST}/{DB_NAME}" f"postgresql://{DB_USER}:{DB_PASS}@{DB_HOST}/{DB_NAME}"
) )