Adjusted files for isort & autopep

This commit is contained in:
creyD
2024-11-12 08:54:34 +00:00
committed by github-actions[bot]
parent 2940ddbdcd
commit 50031556f9
2 changed files with 22 additions and 22 deletions

View File

@@ -17,8 +17,14 @@ SQLALCHEMY_DATABASE_URL = f"postgresql+psycopg://{user}:{password}@{host}:{port}
async_engine = create_async_engine(SQLALCHEMY_DATABASE_URL + name, pool_pre_ping=True)
AsyncSessionLocal = sessionmaker(bind=async_engine, class_=AsyncSession,
expire_on_commit=False, autoflush=False, autocommit=False)
AsyncSessionLocal = sessionmaker(
bind=async_engine,
class_=AsyncSession,
expire_on_commit=False,
autoflush=False,
autocommit=False,
)
async def get_async_db() -> AsyncGenerator[AsyncSession, None]:
async with AsyncSessionLocal() as db: