Skip to content

Commit

Permalink
fix: update python file with black formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
changemyminds committed Apr 10, 2024
1 parent fe9e093 commit 8a5a38a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,25 @@ def _uninstrument(self, **kwargs):

@staticmethod
def _instrument_thread():
wrap_function_wrapper(threading.Thread, 'start',
ThreadingInstrumentor.__wrap_threading_start)
wrap_function_wrapper(threading.Thread, 'run',
ThreadingInstrumentor.__wrap_threading_run)
wrap_function_wrapper(
threading.Thread,
"start",
ThreadingInstrumentor.__wrap_threading_start,
)
wrap_function_wrapper(
threading.Thread, "run", ThreadingInstrumentor.__wrap_threading_run
)

@staticmethod
def _instrument_timer():
wrap_function_wrapper(threading.Timer, 'start',
ThreadingInstrumentor.__wrap_threading_start)
wrap_function_wrapper(threading.Timer, 'run',
ThreadingInstrumentor.__wrap_threading_run)
wrap_function_wrapper(
threading.Timer,
"start",
ThreadingInstrumentor.__wrap_threading_start,
)
wrap_function_wrapper(
threading.Timer, "run", ThreadingInstrumentor.__wrap_threading_run
)

@staticmethod
def _uninstrument_thread():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ def test_trace_context_propagation_in_thread(self):
self.run_threading_test(threading.Thread(target=self.fake_func))

def test_trace_context_propagation_in_timer(self):
self.run_threading_test(threading.Timer(
interval=1, function=self.fake_func))
self.run_threading_test(
threading.Timer(interval=1, function=self.fake_func)
)

def run_threading_test(self, thread: threading.Thread):
with self.get_root_span() as span:
Expand Down

0 comments on commit 8a5a38a

Please sign in to comment.