New version: 0.2.0

This commit is contained in:
2026-08-23 16:03:02 +03:00
parent 3177bea8dd
commit ae082b5c87
7 changed files with 42 additions and 205 deletions

View File

@@ -44,7 +44,7 @@ class RepositoriesContainer:
await repository.create_tables()
@asynccontextmanager
async def transaction(self) -> AsyncGenerator[AsyncSession, None]:
async def transaction(self) -> AsyncGenerator[AsyncSession]:
existing_session = self._session_context.get(None)
if existing_session is not None:
yield existing_session
@@ -63,7 +63,7 @@ class RepositoriesContainer:
self._session_context.reset(token)
@asynccontextmanager
async def nested_transaction(self) -> AsyncGenerator[AsyncSession, None]:
async def nested_transaction(self) -> AsyncGenerator[AsyncSession]:
existing_session = self._session_context.get(None)
if existing_session is not None:
async with existing_session.begin_nested():