Skip to content

Commit 48eceac

Browse files
committed
resolve flake8 and black issues
1 parent a2d9f1b commit 48eceac

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-9
lines changed

ddtrace/__init__.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44
from .internal.import_hooks import patch as patch_import_hooks
55
patch_import_hooks() # noqa: E402
66

7-
from .monkey import patch, patch_all
8-
from .pin import Pin
9-
from .span import Span
10-
from .tracer import Tracer
11-
from .settings import config
12-
from .utils.deprecation import deprecated
7+
8+
from .monkey import patch, patch_all # noqa: E402
9+
from .pin import Pin # noqa: E402
10+
from .span import Span # noqa: E402
11+
from .tracer import Tracer # noqa: E402
12+
from .settings import config # noqa: E402
13+
from .utils.deprecation import deprecated # noqa: E402
14+
1315

1416
try:
1517
__version__ = pkg_resources.get_distribution(__name__).version

ddtrace/compat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def _shadowed_dict(klass):
184184
pass
185185
else:
186186
if not (
187-
type(class_dict) is types.GetSetDescriptorType
187+
type(class_dict) is types.GetSetDescriptorType # noqa: E721
188188
and class_dict.__name__ == "__dict__" # noqa: E721,E261,W504
189189
and class_dict.__objclass__ is entry # noqa: E261,W504
190190
):

ddtrace/opentracer/tracer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def __init__(self, service_name=None, config=None, scope_manager=None, dd_tracer
6969
invalid_keys = config_invalid_keys(self._config)
7070
if invalid_keys:
7171
str_invalid_keys = ','.join(invalid_keys)
72-
raise ConfigException('invalid key(s) given (%s)'.format(str_invalid_keys))
72+
raise ConfigException('invalid key(s) given ({})'.format(str_invalid_keys))
7373

7474
if not self._service_name:
7575
raise ConfigException(""" Cannot detect the \'service_name\'.

ddtrace/span.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ def pprint(self):
383383
]
384384

385385
lines.extend((' ', '%s:%s' % kv) for kv in sorted(self.meta.items()))
386-
return '\n'.join('%10s %s' % l for l in lines)
386+
return '\n'.join('%10s %s' % line for line in lines)
387387

388388
@property
389389
def context(self):

tests/contrib/asyncio/test_tracer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@ def test_trace_multiple_coroutines_ot_inner(self):
370370
# if multiple coroutines have nested tracing, they must belong
371371
# to the same trace
372372
ot_tracer = init_tracer('asyncio_svc', self.tracer)
373+
373374
@asyncio.coroutine
374375
def coro():
375376
# another traced coroutine

0 commit comments

Comments
 (0)