Skip to content

Commit 208c219

Browse files
committed
fix: fix mypy errors (#62)
1 parent 8be8d86 commit 208c219

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

src/ttt/infrastructure/retrier.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from collections.abc import Callable
1+
from collections.abc import Awaitable, Callable
22
from dataclasses import dataclass, field
33

44

@@ -19,13 +19,13 @@ def retry(self) -> bool:
1919

2020
async def __call__[**PmT, RT](
2121
self,
22-
action: Callable[PmT, RT],
22+
action: Callable[PmT, Awaitable[RT]],
2323
*args: PmT.args,
2424
**kwargs: PmT.kwargs,
2525
) -> RT:
2626
while True:
2727
try:
28-
return action(*args, **kwargs)
28+
return await action(*args, **kwargs)
2929
except BaseException as error:
3030
if type(error) not in self._max_retries_map:
3131
raise error from error

src/ttt/main/tg_bot/di.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,6 @@
153153
from ttt.presentation.tasks.auto_cancel_invitations_to_game_task import (
154154
AutoCancelInvitationsToGameTask,
155155
)
156-
from ttt.presentation.tasks.complete_stars_purchase_payment_task import (
157-
CompleteStarsPurchasePaymentTask,
158-
)
159156
from ttt.presentation.tasks.matchmake_tasks import MatchmakeTasks
160157
from ttt.presentation.tasks.unkillable_tasks import UnkillableTasks
161158
from ttt.presentation.unkillable_task_group import UnkillableTaskGroup
@@ -269,12 +266,6 @@ def provide_auto_cancel_invitations_to_game_task(
269266
),
270267
)
271268

272-
@provide(scope=Scope.APP)
273-
def provide_complete_stars_purchase_payment_task(
274-
self,
275-
) -> CompleteStarsPurchasePaymentTask:
276-
return CompleteStarsPurchasePaymentTask()
277-
278269
@provide(scope=Scope.APP)
279270
def provide_matchmake_tasks(
280271
self,
@@ -301,12 +292,10 @@ async def unkillable_tasks(
301292
self,
302293
task_group: UnkillableTaskGroup,
303294
auto_cancel_invitations_to_game_task: AutoCancelInvitationsToGameTask,
304-
complete_stars_purchase_payment_task: CompleteStarsPurchasePaymentTask,
305295
matchmake_tasks: MatchmakeTasks,
306296
) -> UnkillableTasks:
307297
tasks = (
308298
auto_cancel_invitations_to_game_task,
309-
complete_stars_purchase_payment_task,
310299
matchmake_tasks,
311300
)
312301
return UnkillableTasks(tasks, task_group)

0 commit comments

Comments
 (0)