Repository: open-telemetry/opentelemetry-python

Issue:
fix some imports



Discussion:

Resolving patch:
diff --git a/opentelemetry-api/src/opentelemetry/trace/propagation/tracecontext.py b/opentelemetry-api/src/opentelemetry/trace/propagation/tracecontext.py
--- a/opentelemetry-api/src/opentelemetry/trace/propagation/tracecontext.py
+++ b/opentelemetry-api/src/opentelemetry/trace/propagation/tracecontext.py
@@ -15,7 +15,7 @@
 import re
 import typing
 
-import opentelemetry.trace as trace
+from opentelemetry import trace
 from opentelemetry.context.context import Context
 from opentelemetry.propagators import textmap
 from opentelemetry.trace import format_span_id, format_trace_id
diff --git a/propagator/opentelemetry-propagator-b3/src/opentelemetry/propagators/b3/__init__.py b/propagator/opentelemetry-propagator-b3/src/opentelemetry/propagators/b3/__init__.py
--- a/propagator/opentelemetry-propagator-b3/src/opentelemetry/propagators/b3/__init__.py
+++ b/propagator/opentelemetry-propagator-b3/src/opentelemetry/propagators/b3/__init__.py
@@ -17,7 +17,7 @@
 
 from deprecated import deprecated
 
-import opentelemetry.trace as trace
+from opentelemetry import trace
 from opentelemetry.context import Context
 from opentelemetry.propagators.textmap import (
     CarrierT,
diff --git a/propagator/opentelemetry-propagator-jaeger/src/opentelemetry/propagators/jaeger/__init__.py b/propagator/opentelemetry-propagator-jaeger/src/opentelemetry/propagators/jaeger/__init__.py
--- a/propagator/opentelemetry-propagator-jaeger/src/opentelemetry/propagators/jaeger/__init__.py
+++ b/propagator/opentelemetry-propagator-jaeger/src/opentelemetry/propagators/jaeger/__init__.py
@@ -15,8 +15,7 @@
 import typing
 import urllib.parse
 
-import opentelemetry.trace as trace
-from opentelemetry import baggage
+from opentelemetry import baggage, trace
 from opentelemetry.context import Context
 from opentelemetry.propagators.textmap import (
     CarrierT,


Test patch:
diff --git a/exporter/opentelemetry-exporter-jaeger-proto-grpc/tests/test_jaeger_exporter_protobuf.py b/exporter/opentelemetry-exporter-jaeger-proto-grpc/tests/test_jaeger_exporter_protobuf.py
--- a/exporter/opentelemetry-exporter-jaeger-proto-grpc/tests/test_jaeger_exporter_protobuf.py
+++ b/exporter/opentelemetry-exporter-jaeger-proto-grpc/tests/test_jaeger_exporter_protobuf.py
@@ -17,12 +17,13 @@
 from collections import OrderedDict
 from unittest import mock
 
-# pylint:disable=no-name-in-module
-# pylint:disable=import-error
-import opentelemetry.exporter.jaeger.proto.grpc.gen.model_pb2 as model_pb2
 import opentelemetry.exporter.jaeger.proto.grpc.translate as pb_translator
 from opentelemetry import trace as trace_api
 from opentelemetry.exporter.jaeger.proto.grpc import JaegerExporter
+
+# pylint:disable=no-name-in-module
+# pylint:disable=import-error
+from opentelemetry.exporter.jaeger.proto.grpc.gen import model_pb2
 from opentelemetry.exporter.jaeger.proto.grpc.translate import (
     NAME_KEY,
     VERSION_KEY,
diff --git a/propagator/opentelemetry-propagator-jaeger/tests/test_jaeger_propagator.py b/propagator/opentelemetry-propagator-jaeger/tests/test_jaeger_propagator.py
--- a/propagator/opentelemetry-propagator-jaeger/tests/test_jaeger_propagator.py
+++ b/propagator/opentelemetry-propagator-jaeger/tests/test_jaeger_propagator.py
@@ -15,8 +15,6 @@
 import unittest
 from unittest.mock import Mock
 
-import opentelemetry.sdk.trace as trace
-import opentelemetry.sdk.trace.id_generator as id_generator
 import opentelemetry.trace as trace_api
 from opentelemetry import baggage
 from opentelemetry.baggage import _BAGGAGE_KEY
@@ -24,6 +22,8 @@
 from opentelemetry.propagators import (  # pylint: disable=no-name-in-module
     jaeger,
 )
+from opentelemetry.sdk import trace
+from opentelemetry.sdk.trace import id_generator
 
 FORMAT = jaeger.JaegerPropagator()