Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ocelotl committed Jul 17, 2020
1 parent 520351b commit 7504704
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,17 @@
import opentracing
from deprecated import deprecated

from opentelemetry.trace import get_current_span, INVALID_SPAN_CONTEXT, Link
from opentelemetry import propagators
from opentelemetry.context import Context
from opentelemetry.ext.opentracing_shim import util
from opentelemetry.ext.opentracing_shim.version import __version__
from opentelemetry.trace import DefaultSpan, set_span_in_context
from opentelemetry.trace import (
INVALID_SPAN_CONTEXT,
DefaultSpan,
Link,
get_current_span,
set_span_in_context,
)

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -265,12 +270,14 @@ def log_event(self, event, payload=None):
super().log_event(event, payload=payload)

def set_baggage_item(self, key, value):
copy = {key_: value_ for key_, value_ in self._context._baggage.items()}
# pylint: disable=protected-access
copy = self._context._baggage.copy()
copy.update({key: value})

self._context._baggage = Context(copy)

def get_baggage_item(self, key):
# pylint: disable=protected-access
return self._context._baggage[key]


Expand Down
8 changes: 5 additions & 3 deletions ext/opentelemetry-ext-opentracing-shim/tests/test_shim.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@

import opentracing

from opentelemetry import propagators, trace
from opentelemetry.ext.opentracing_shim import (
create_tracer, SpanContextShim, SpanShim
SpanContextShim,
SpanShim,
create_tracer,
util,
)
from opentelemetry import propagators, trace
from opentelemetry.ext.opentracing_shim import util
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.test.mock_httptextformat import (
MockHTTPTextFormat,
Expand Down

0 comments on commit 7504704

Please sign in to comment.