Skip to content

Commit 5bad7f1

Browse files
sentrivanaszokeasaurusrex
authored andcommitted
mypy fixes
1 parent add2067 commit 5bad7f1

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

sentry_sdk/integrations/opentelemetry/contextvars_context.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
from opentelemetry.context.context import Context # type: ignore
2-
from opentelemetry.context.contextvars_context import ContextVarsRuntimeContext # type: ignore
1+
from opentelemetry.context.context import Context
2+
from opentelemetry.context.contextvars_context import ContextVarsRuntimeContext
33

44

5-
class SentryContextVarsRuntimeContext(ContextVarsRuntimeContext): # type: ignore
5+
class SentryContextVarsRuntimeContext(ContextVarsRuntimeContext):
66
def attach(self, context):
77
# type: (Context) -> object
88
# TODO-neel-potel do scope management

sentry_sdk/integrations/opentelemetry/potel_span_processor.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
from opentelemetry.sdk.trace import SpanProcessor # type: ignore
2-
from opentelemetry.context import Context # type: ignore
3-
from opentelemetry.trace import Span # type: ignore
1+
from opentelemetry.sdk.trace import SpanProcessor
2+
from opentelemetry.context import Context
43

54
from sentry_sdk._types import TYPE_CHECKING
65

76
if TYPE_CHECKING:
87
from typing import Optional
8+
from opentelemetry.sdk.trace import ReadableSpan
99

1010

11-
class PotelSentrySpanProcessor(SpanProcessor): # type: ignore
11+
class PotelSentrySpanProcessor(SpanProcessor):
1212
"""
1313
Converts OTel spans into Sentry spans so they can be sent to the Sentry backend.
1414
"""
@@ -25,11 +25,11 @@ def __init__(self):
2525
pass
2626

2727
def on_start(self, span, parent_context=None):
28-
# type: (Span, Optional[Context]) -> None
28+
# type: (ReadableSpan, Optional[Context]) -> None
2929
pass
3030

3131
def on_end(self, span):
32-
# type: (Span) -> None
32+
# type: (ReadableSpan) -> None
3333
pass
3434

3535
# TODO-neel-potel not sure we need a clear like JS

0 commit comments

Comments
 (0)