File tree Expand file tree Collapse file tree
tests/integrations/asyncio Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55from sentry_sdk .consts import OP
66from sentry_sdk .integrations import DidNotEnable , Integration
77from sentry_sdk .integrations ._wsgi_common import nullcontext
8+ from sentry_sdk .traces import StreamedSpan
9+ from sentry_sdk .tracing import Span
810from sentry_sdk .tracing_utils import has_span_streaming_enabled
911from sentry_sdk .transport import AsyncHttpTransport
1012from sentry_sdk .utils import (
2022except ImportError :
2123 raise DidNotEnable ("asyncio not available" )
2224
23- from typing import TYPE_CHECKING
25+ from typing import TYPE_CHECKING , Optional , Union
2426
2527if TYPE_CHECKING :
2628 from collections .abc import Coroutine
@@ -147,7 +149,7 @@ async def _task_with_sentry_span_creation() -> "Any":
147149 integration = client .get_integration (AsyncioIntegration )
148150 task_spans = integration .task_spans if integration else False
149151
150- span_ctx = None
152+ span_ctx : "Optional[Union[StreamedSpan, Span]]" = None
151153 is_span_streaming_enabled = has_span_streaming_enabled (client .options )
152154
153155 with sentry_sdk .isolation_scope ():
You can’t perform that action at this time.
0 commit comments