From 5e6a586d1ae8659f0bdc9483a9a1a65b7067f915 Mon Sep 17 00:00:00 2001 From: Riccardo Magliocchetti Date: Fri, 13 Sep 2024 16:02:07 +0200 Subject: [PATCH] opentelemetry-instrumentation: fix formatting --- .../instrumentation/auto_instrumentation/__init__.py | 2 +- .../instrumentation/auto_instrumentation/_load.py | 8 +++++--- .../src/opentelemetry/instrumentation/bootstrap.py | 7 ++++--- .../src/opentelemetry/instrumentation/dependencies.py | 9 ++++++--- .../src/opentelemetry/instrumentation/distro.py | 2 +- 5 files changed, 17 insertions(+), 11 deletions(-) diff --git a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/auto_instrumentation/__init__.py b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/auto_instrumentation/__init__.py index 22a2e03464..963b3a6956 100644 --- a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/auto_instrumentation/__init__.py +++ b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/auto_instrumentation/__init__.py @@ -13,7 +13,6 @@ # limitations under the License. from argparse import REMAINDER, ArgumentParser -from opentelemetry.util._importlib_metadata import entry_points from logging import getLogger from os import environ, execl, getcwd from os.path import abspath, dirname, pathsep @@ -21,6 +20,7 @@ from shutil import which from opentelemetry.instrumentation.version import __version__ +from opentelemetry.util._importlib_metadata import entry_points _logger = getLogger(__name__) diff --git a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/auto_instrumentation/_load.py b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/auto_instrumentation/_load.py index ec6244d410..2f1c478c43 100644 --- a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/auto_instrumentation/_load.py +++ b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/auto_instrumentation/_load.py @@ -12,9 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from opentelemetry.util._importlib_metadata import ( - EntryPoint, distributions, entry_points -) from logging import getLogger from os import environ @@ -28,6 +25,11 @@ OTEL_PYTHON_DISTRO, ) from opentelemetry.instrumentation.version import __version__ +from opentelemetry.util._importlib_metadata import ( + EntryPoint, + distributions, + entry_points, +) _logger = getLogger(__name__) diff --git a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap.py b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap.py index aae56648e0..02926ea5c4 100644 --- a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap.py +++ b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap.py @@ -15,9 +15,6 @@ import argparse import logging import sys -from opentelemetry.util._importlib_metadata import ( - PackageNotFoundError, version -) from subprocess import ( PIPE, CalledProcessError, @@ -33,6 +30,10 @@ libraries, ) from opentelemetry.instrumentation.version import __version__ +from opentelemetry.util._importlib_metadata import ( + PackageNotFoundError, + version, +) logger = logging.getLogger(__name__) diff --git a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/dependencies.py b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/dependencies.py index 6e9379fb8c..7ebc88d647 100644 --- a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/dependencies.py +++ b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/dependencies.py @@ -12,14 +12,17 @@ # See the License for the specific language governing permissions and # limitations under the License. -from opentelemetry.util._importlib_metadata import ( - Distribution, PackageNotFoundError, version -) from logging import getLogger from typing import Collection, Optional, Union from packaging.requirements import InvalidRequirement, Requirement +from opentelemetry.util._importlib_metadata import ( + Distribution, + PackageNotFoundError, + version, +) + logger = getLogger(__name__) diff --git a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/distro.py b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/distro.py index ed7a3bf3d4..1bc847f988 100644 --- a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/distro.py +++ b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/distro.py @@ -18,10 +18,10 @@ """ from abc import ABC, abstractmethod -from opentelemetry.util._importlib_metadata import EntryPoint from logging import getLogger from opentelemetry.instrumentation.instrumentor import BaseInstrumentor +from opentelemetry.util._importlib_metadata import EntryPoint _LOG = getLogger(__name__)