type cheking

This commit is contained in:
IluaAir
2025-08-11 10:07:56 +03:00
parent 644d5614b9
commit ddc38dbd07
5 changed files with 27 additions and 20 deletions

View File

@@ -1,15 +1,18 @@
from typing import Protocol
from typing import Any, Protocol
from sqlalchemy.ext.asyncio import AsyncSession
from src.repository.tasks import TasksRepo
from src.repository.users import UsersRepo
class IUOWDB(Protocol):
session: AsyncSession
user: UsersRepo
task: TasksRepo
async def __aenter__(self) -> "IUOWDB": ...
async def __aexit__(self, exc_type, exc_val, exc_tb) -> None: ...
async def __aexit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None: ...
async def commit(self) -> None: ...