add ruff format, ruff check, time_picker, project structure and imports reorganized

This commit is contained in:
Alexander Kalinovsky committed 2025-01-21 23:50:19 +01:00
1 parent ced47ac993
commit 9dd0708a5b
58 files changed
+3690 -2583

No files matched your search

+8 -7
View File
@@ -4,15 +4,16 @@ from sqlalchemy.orm import sessionmaker
from ..config import config
import logging
logger = logging.getLogger('sqlalchemy.engine')
logger.setLevel(logging.DEBUG)
# import logging
# logger = logging.getLogger('sqlalchemy.engine')
# logger.setLevel(logging.DEBUG)
async_engine = create_async_engine(config.DATABASE_URI)
async_session = sessionmaker[AsyncSession](
async_engine, class_=AsyncSession, expire_on_commit=False
)
async_engine, class_=AsyncSession, expire_on_commit=False
)
async def get_db() -> AsyncSession: # type: ignore
async def get_db() -> AsyncSession: # type: ignore
async with async_session() as session:
yield session
yield session