From 3b8f2b1045d6beeebd506dd22c9574acb0a476b1 Mon Sep 17 00:00:00 2001 From: brecht stamper Date: Tue, 2 Apr 2024 13:14:17 +0200 Subject: [PATCH] code qual --- scrapy/meter_providers.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scrapy/meter_providers.py b/scrapy/meter_providers.py index 8ed2f39b9f2..9e58aef8393 100644 --- a/scrapy/meter_providers.py +++ b/scrapy/meter_providers.py @@ -5,7 +5,7 @@ import logging from typing import TYPE_CHECKING -from opentelemetry.metrics import NoOpMeterProvider, MeterProvider +from opentelemetry.metrics import NoOpMeterProvider as OTNoOpMeterProvider, MeterProvider as OTMeterProvider from opentelemetry.sdk.metrics.view import View if TYPE_CHECKING: @@ -14,7 +14,7 @@ logger = logging.getLogger(__name__) -class MeterProvider(MeterProvider, ABC): +class MeterProvider(OTMeterProvider, ABC): """ Wrapper for MeterProvider so we have crawler available during init. """ @@ -32,9 +32,9 @@ def add_view(self, view: View): """ self._views.append(view) -class NoOpMeterProvider(NoOpMeterProvider, MeterProvider): +class NoOpMeterProvider(OTNoOpMeterProvider, MeterProvider): """ Wrapper for NoOpMeterProvider so we support passing crawler during init. """ def __init__(self, crawler: "Crawler"): - super().__init__(crawler) \ No newline at end of file + super().__init__(crawler)