Skip to content

Commit d1eb610

Browse files
committed
Run another round of codemods after merge
1 parent e9a581f commit d1eb610

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

sentry_sdk/integrations/django/tasks.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,14 @@
1717
from typing import Any
1818

1919

20-
def patch_tasks():
21-
# type: () -> None
20+
def patch_tasks() -> None:
2221
if Task is None:
2322
return
2423

2524
old_task_enqueue = Task.enqueue
2625

2726
@wraps(old_task_enqueue)
28-
def _sentry_enqueue(self, *args, **kwargs):
29-
# type: (Any, Any, Any) -> Any
27+
def _sentry_enqueue(self: "Any", *args: "Any", **kwargs: "Any") -> "Any":
3028
from sentry_sdk.integrations.django import DjangoIntegration
3129

3230
integration = sentry_sdk.get_client().get_integration(DjangoIntegration)

sentry_sdk/integrations/otlp.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,12 @@ class SentryOTLPPropagator(SentryPropagator):
9595
For incoming baggage, we just pass it on as is so that case is correctly handled.
9696
"""
9797

98-
def inject(self, carrier, context=None, setter=default_setter):
99-
# type: (CarrierT, Optional[Context], Setter[CarrierT]) -> None
98+
def inject(
99+
self,
100+
carrier: "CarrierT",
101+
context: "Optional[Context]" = None,
102+
setter: "Setter[CarrierT]" = default_setter,
103+
) -> None:
100104
otlp_integration = get_client().get_integration(OTLPIntegration)
101105
if otlp_integration is None:
102106
return
@@ -120,8 +124,7 @@ def inject(self, carrier, context=None, setter=default_setter):
120124
setter.set(carrier, BAGGAGE_HEADER_NAME, baggage_data)
121125

122126

123-
def _to_traceparent(span_context):
124-
# type: (SpanContext) -> str
127+
def _to_traceparent(span_context: "SpanContext") -> str:
125128
"""
126129
Helper method to generate the sentry-trace header.
127130
"""

0 commit comments

Comments
 (0)