From 4614bd9e3c4aeb2877db63931f590ce6117d409f Mon Sep 17 00:00:00 2001 From: Jessica Gamio Date: Wed, 18 Sep 2024 10:56:25 -0700 Subject: [PATCH] fixed linting errors --- ddtrace/_trace/trace_handlers.py | 1 - ddtrace/contrib/rq/__init__.py | 12 +++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/ddtrace/_trace/trace_handlers.py b/ddtrace/_trace/trace_handlers.py index 74061387bcc..7917b02ce48 100644 --- a/ddtrace/_trace/trace_handlers.py +++ b/ddtrace/_trace/trace_handlers.py @@ -34,7 +34,6 @@ from ddtrace.internal.constants import RESPONSE_HEADERS from ddtrace.internal.logger import get_logger from ddtrace.internal.schema.span_attribute_schema import SpanDirection -from ddtrace.internal.utils import get_argument_value from ddtrace.internal.utils import http as http_utils from ddtrace.propagation.http import HTTPPropagator diff --git a/ddtrace/contrib/rq/__init__.py b/ddtrace/contrib/rq/__init__.py index fb90a5f338f..8175690d2e3 100644 --- a/ddtrace/contrib/rq/__init__.py +++ b/ddtrace/contrib/rq/__init__.py @@ -80,7 +80,6 @@ from ddtrace import Pin from ddtrace import config -from ddtrace._trace.trace_handlers import _start_span from ddtrace.constants import SPAN_KIND from ddtrace.internal import core from ddtrace.internal.constants import COMPONENT @@ -92,7 +91,6 @@ from ...ext import SpanKind from ...ext import SpanTypes -from ...propagation.http import HTTPPropagator from .. import trace_utils @@ -159,7 +157,7 @@ def traced_queue_enqueue_job(rq, pin, func, instance, args, kwargs): JOB_ID: job.get_id(), JOB_FUNC_NAME: job.func_name, }, - ) as ctx, ctx[ctx["call_key"]] as span: + ) as ctx, ctx[ctx["call_key"]] as _: # If the queue is_async then add distributed tracing headers to the job if instance.is_async: core.dispatch("rq.queue.enqueue_job", [ctx, job.meta]) @@ -178,7 +176,7 @@ def traced_queue_fetch_job(rq, pin, func, instance, args, kwargs): service=trace_utils.int_service(pin, config.rq), call_key="traced_queue_fetch_job", tags={COMPONENT: config.rq.integration_name, JOB_ID: job_id}, - ) as ctx, ctx[ctx["call_key"]] as span: + ) as ctx, ctx[ctx["call_key"]] as _: return func(*args, **kwargs) @@ -200,7 +198,7 @@ def traced_perform_job(rq, pin, func, instance, args, kwargs): distributed_headers_config=config.rq_worker, distributed_headers=job.meta, tags={COMPONENT: config.rq.integration_name, SPAN_KIND: SpanKind.CONSUMER, JOB_ID: job.get_id()}, - ) as ctx, ctx[ctx["call_key"]] as span: + ) as ctx, ctx[ctx["call_key"]] as _: try: return func(*args, **kwargs) finally: @@ -231,7 +229,7 @@ def traced_job_perform(rq, pin, func, instance, args, kwargs): call_key="job.perform", pin=pin, tags={COMPONENT: config.rq.integration_name, JOB_ID: job.get_id()}, - ) as ctx, ctx[ctx["call_key"]] as span: + ) as ctx, ctx[ctx["call_key"]] as _: return func(*args, **kwargs) @@ -248,7 +246,7 @@ def traced_job_fetch_many(rq, pin, func, instance, args, kwargs): call_key="job.fetch_many", pin=pin, tags={COMPONENT: config.rq.integration_name, JOB_ID: job_ids}, - ) as ctx, ctx[ctx["call_key"]] as span: + ) as ctx, ctx[ctx["call_key"]] as _: return func(*args, **kwargs)