Skip to content

Commit 0ce2956

Browse files
committed
Fix flake errors
1 parent fdc7270 commit 0ce2956

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

ddtrace/processors.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ class FilterRequestsOnUrl():
1111
the provided regular expression using the standard python regexp match
1212
semantic (https://docs.python.org/2/library/re.html#re.match).
1313
14-
:param list regexps: the list of regular expressions (as strings) defining the urls that should be filtered out. (a single string is also accepted)
14+
:param list regexps: the list of regular expressions (as strings) defining
15+
the urls that should be filtered out. (a single string is also accepted)
1516
1617
Examples:
1718
@@ -42,7 +43,7 @@ def process_trace(self, trace):
4243
trace is discarded.
4344
"""
4445
for span in trace:
45-
if span.parent_id == None and span.get_tag(http.URL) is not None:
46+
if span.parent_id is None and span.get_tag(http.URL) is not None:
4647
url = span.get_tag(http.URL)
4748
for regexp in self._regexps:
4849
if regexp.match(url):

ddtrace/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
PROCESSING_PIPELINE_KEY = "PROCESSING_PIPELINE"
22

3-
#Shorter Alias
3+
# Shorter Alias
44
PP_KEY = PROCESSING_PIPELINE_KEY

ddtrace/tracer.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,11 @@ def configure(self, enabled=None, hostname=None, port=None, sampler=None,
9696
processing_pipeline = settings[PP_KEY]
9797

9898
if hostname is not None or port is not None or processing_pipeline is not None:
99-
self.writer = AgentWriter(hostname or self.DEFAULT_HOSTNAME, port or self.DEFAULT_PORT, processing_pipeline=processing_pipeline)
99+
self.writer = AgentWriter(
100+
hostname or self.DEFAULT_HOSTNAME,
101+
port or self.DEFAULT_PORT,
102+
processing_pipeline=processing_pipeline
103+
)
100104

101105
if sampler is not None:
102106
self.sampler = sampler

ddtrace/writer.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ def _reset_worker(self):
5353

5454
# ensure we have an active thread working on this queue
5555
if not self._worker or not self._worker.is_alive():
56-
self._worker = AsyncWorker(self.api, self._traces, self._services, processing_pipeline=self._processing_pipeline)
56+
self._worker = AsyncWorker(
57+
self.api,
58+
self._traces,
59+
self._services, processing_pipeline=self._processing_pipeline
60+
)
5761

5862

5963
class AsyncWorker(object):

0 commit comments

Comments
 (0)