From 020649c23f184baefd7d64877c913fb9e5b233f1 Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Wed, 8 Feb 2023 18:40:42 -0600 Subject: [PATCH] Fix mypy --- opentelemetry-api/src/opentelemetry/context/__init__.py | 2 +- opentelemetry-api/src/opentelemetry/propagate/__init__.py | 2 +- opentelemetry-api/src/opentelemetry/util/_providers.py | 2 +- opentelemetry-api/tests/util/test__importlib_metadata.py | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/opentelemetry-api/src/opentelemetry/context/__init__.py b/opentelemetry-api/src/opentelemetry/context/__init__.py index 3e85b64fe48..b8b0ee6445b 100644 --- a/opentelemetry-api/src/opentelemetry/context/__init__.py +++ b/opentelemetry-api/src/opentelemetry/context/__init__.py @@ -22,7 +22,7 @@ # pylint: disable=wrong-import-position from opentelemetry.context.context import Context, _RuntimeContext # noqa from opentelemetry.environment_variables import OTEL_PYTHON_CONTEXT -from opentelemetry.util._importlib_metadata import entry_points +from opentelemetry.util._importlib_metadata import entry_points # type: ignore logger = logging.getLogger(__name__) _RUNTIME_CONTEXT = None # type: typing.Optional[_RuntimeContext] diff --git a/opentelemetry-api/src/opentelemetry/propagate/__init__.py b/opentelemetry-api/src/opentelemetry/propagate/__init__.py index 56f217f282d..fb45bd2e0dd 100644 --- a/opentelemetry-api/src/opentelemetry/propagate/__init__.py +++ b/opentelemetry-api/src/opentelemetry/propagate/__init__.py @@ -75,7 +75,7 @@ def example_route(): from opentelemetry.context.context import Context from opentelemetry.environment_variables import OTEL_PROPAGATORS from opentelemetry.propagators import composite, textmap -from opentelemetry.util._importlib_metadata import entry_points +from opentelemetry.util._importlib_metadata import entry_points # type: ignore logger = getLogger(__name__) diff --git a/opentelemetry-api/src/opentelemetry/util/_providers.py b/opentelemetry-api/src/opentelemetry/util/_providers.py index d255ac999f0..6d1d5f3b782 100644 --- a/opentelemetry-api/src/opentelemetry/util/_providers.py +++ b/opentelemetry-api/src/opentelemetry/util/_providers.py @@ -16,7 +16,7 @@ from os import environ from typing import TYPE_CHECKING, TypeVar, cast -from opentelemetry.util._importlib_metadata import entry_points +from opentelemetry.util._importlib_metadata import entry_points # type: ignore if TYPE_CHECKING: from opentelemetry.metrics import MeterProvider diff --git a/opentelemetry-api/tests/util/test__importlib_metadata.py b/opentelemetry-api/tests/util/test__importlib_metadata.py index 22bd344a036..88753265464 100644 --- a/opentelemetry-api/tests/util/test__importlib_metadata.py +++ b/opentelemetry-api/tests/util/test__importlib_metadata.py @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +# type: ignore + from typing import Dict, Tuple from unittest import TestCase