Skip to content

Commit

Permalink
Fix bug with type inference on coroutine provider
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan committed Oct 27, 2024
1 parent c1a0026 commit 9611331
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/injection/providers/coroutine.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Awaitable, Callable, TypeVar
from typing import Any, Awaitable, Callable, TypeVar, cast

from typing_extensions import ParamSpec

Expand All @@ -16,3 +16,6 @@ def __init__(
**kw: P.kwargs,
) -> None:
super().__init__(coroutine, *a, **kw)

def __call__(self, *args: Any, **kwargs: Any) -> Awaitable[T]:
return cast(Awaitable[T], super().__call__(*args, **kwargs))

0 comments on commit 9611331

Please sign in to comment.