Skip to content

Commit b5ee9af

Browse files
.
1 parent 5ec677d commit b5ee9af

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

sentry_sdk/integrations/asyncio.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@
1515
from typing import cast, TYPE_CHECKING
1616

1717
if TYPE_CHECKING:
18-
from typing import Any
18+
from typing import Any, Callable, TypeVar
1919
from collections.abc import Coroutine
2020

2121
from sentry_sdk._types import ExcInfo
2222

23+
F = TypeVar("T", bound=Callable[..., Any])
24+
2325

2426
def get_name(coro):
2527
# type: (Any) -> str
@@ -31,11 +33,11 @@ def get_name(coro):
3133

3234

3335
def _wrap_coroutine(wrapped):
34-
# type: (Coroutine[Any, Any, Any]) -> Coroutine[Any, Any, Any]
36+
# type: (Coroutine[Any, Any, Any]) -> Callable[[T], T]
3537
# Only __name__ and __qualname__ are copied from function to coroutine in CPython
3638
return functools.partial(
3739
functools.update_wrapper,
38-
wrapped=wrapped,
40+
wrapped=wrapped, # type: ignore
3941
assigned=("__name__", "__qualname__"),
4042
updated=(),
4143
)

0 commit comments

Comments
 (0)