Refactor imports
This commit is contained in:
parent
8f77438b7d
commit
7e1bcd40a7
6
bot.py
6
bot.py
|
@ -1,11 +1,11 @@
|
|||
#!/usr/bin/python
|
||||
import logging
|
||||
import os
|
||||
|
||||
import asyncio
|
||||
|
||||
from aiogram import Bot, Dispatcher
|
||||
from aiogram.contrib.fsm_storage.memory import MemoryStorage
|
||||
import asyncpg
|
||||
from asyncpg import create_pool
|
||||
|
||||
from middlewares.db import DbMiddleware
|
||||
from handlers.commands import register_command_handlers
|
||||
|
@ -23,7 +23,7 @@ async def main():
|
|||
DB_PASS = os.getenv("DB_PASS")
|
||||
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}"
|
||||
)
|
||||
|
||||
|
|
Reference in a new issue