We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc389c1 commit 4fe2bcdCopy full SHA for 4fe2bcd
sentry_sdk/integrations/asyncio.py
@@ -12,9 +12,10 @@
12
except ImportError:
13
raise DidNotEnable("asyncio not available")
14
15
-from typing import Any, cast, TYPE_CHECKING
+from typing import cast, TYPE_CHECKING
16
17
if TYPE_CHECKING:
18
+ from typing import Any
19
from collections.abc import Coroutine
20
21
from sentry_sdk._types import ExcInfo
@@ -94,7 +95,7 @@ async def _task_with_sentry_span_creation():
94
95
96
# Set the task name to include the original coroutine's name
97
try:
- cast(asyncio.Task[Any], task).set_name(
98
+ cast("asyncio.Task[Any]", task).set_name(
99
f"{get_name(coro)} (Sentry-wrapped)"
100
)
101
except AttributeError:
0 commit comments