feat: явно указаны зависимости к Protocol для перехода к имплементации

This commit is contained in:
Artem Tsyrulnikov
2025-12-23 10:11:31 +03:00
parent 23eb5ae13d
commit 45a5b59cc8
11 changed files with 32 additions and 36 deletions

View File

@@ -296,7 +296,7 @@ class FetchChannelResponse(typing.Protocol):
title: str
class ParserClient(typing.Protocol):
class Parser(typing.Protocol):
async def fetch_telegram_channel(self, username: str) -> FetchChannelResponse | None: ...
@@ -305,7 +305,7 @@ class Usecase:
database: Database
telegram_bot: TelegramBotWriter
jwt_encoder: JWTEncoder
parser_client: ParserClient
parser: Parser
async def ensure_workspace_access(self, workspace_id: UUID, user_id: UUID) -> domain.Workspace:
workspace = await self.database.get_workspace_for_user(workspace_id, user_id)