From e97f3c5d9e1da5d9849f3356aa7ede439c7e4c83 Mon Sep 17 00:00:00 2001 From: sroda Date: Mon, 6 Feb 2023 20:07:46 +0200 Subject: [PATCH] Fix lint --- .../opentelemetry/instrumentation/sqlalchemy/__init__.py | 8 +++----- .../tests/test_sqlalchemy_metrics.py | 7 ++++--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/__init__.py b/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/__init__.py index ed61a740ba..c6322b566c 100644 --- a/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/__init__.py @@ -102,10 +102,6 @@ from sqlalchemy.engine.base import Engine from wrapt import wrap_function_wrapper as _w -from opentelemetry.metrics import Histogram, get_meter -from opentelemetry.trace import get_tracer -from opentelemetry.semconv.metrics import MetricInstruments - from opentelemetry.instrumentation.instrumentor import BaseInstrumentor from opentelemetry.instrumentation.sqlalchemy.engine import ( EngineTracer, @@ -113,9 +109,11 @@ _wrap_create_async_engine, _wrap_create_engine, ) -from opentelemetry.instrumentation.sqlalchemy.version import __version__ from opentelemetry.instrumentation.sqlalchemy.package import _instruments +from opentelemetry.instrumentation.sqlalchemy.version import __version__ from opentelemetry.instrumentation.utils import unwrap +from opentelemetry.metrics import get_meter +from opentelemetry.trace import get_tracer class SQLAlchemyInstrumentor(BaseInstrumentor): diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy_metrics.py b/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy_metrics.py index ec9013a4be..30d5568016 100644 --- a/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy_metrics.py +++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy_metrics.py @@ -12,18 +12,19 @@ # See the License for the specific language governing permissions and # limitations under the License. +from typing import Optional, Sequence + import sqlalchemy from sqlalchemy.pool import QueuePool from opentelemetry.instrumentation.sqlalchemy import SQLAlchemyInstrumentor -from opentelemetry.test.test_base import TestBase -from typing import Optional, Sequence from opentelemetry.sdk.metrics._internal.point import Metric from opentelemetry.sdk.metrics.export import ( + DataPointT, HistogramDataPoint, NumberDataPoint, - DataPointT, ) +from opentelemetry.test.test_base import TestBase class TestSqlalchemyMetricsInstrumentation(TestBase):