Skip to content

Commit af15feb

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

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-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: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,7 @@ 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(self, carrier: "CarrierT", context: "Optional[Context]"=None, setter: "Setter[CarrierT]"=default_setter) -> None:
10099
otlp_integration = get_client().get_integration(OTLPIntegration)
101100
if otlp_integration is None:
102101
return
@@ -120,8 +119,7 @@ def inject(self, carrier, context=None, setter=default_setter):
120119
setter.set(carrier, BAGGAGE_HEADER_NAME, baggage_data)
121120

122121

123-
def _to_traceparent(span_context):
124-
# type: (SpanContext) -> str
122+
def _to_traceparent(span_context: "SpanContext") -> str:
125123
"""
126124
Helper method to generate the sentry-trace header.
127125
"""

0 commit comments

Comments
 (0)