Skip to content

Commit 92db675

Browse files
committed
fix: update python file with black formatter
1 parent 81eae91 commit 92db675

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

instrumentation/opentelemetry-instrumentation-threading/src/opentelemetry/instrumentation/threading/__init__.py

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,25 @@ def _uninstrument(self, **kwargs):
5757

5858
@staticmethod
5959
def _instrument_thread():
60-
wrap_function_wrapper(threading.Thread, 'start',
61-
ThreadingInstrumentor.__wrap_threading_start)
62-
wrap_function_wrapper(threading.Thread, 'run',
63-
ThreadingInstrumentor.__wrap_threading_run)
60+
wrap_function_wrapper(
61+
threading.Thread,
62+
"start",
63+
ThreadingInstrumentor.__wrap_threading_start,
64+
)
65+
wrap_function_wrapper(
66+
threading.Thread, "run", ThreadingInstrumentor.__wrap_threading_run
67+
)
6468

6569
@staticmethod
6670
def _instrument_timer():
67-
wrap_function_wrapper(threading.Timer, 'start',
68-
ThreadingInstrumentor.__wrap_threading_start)
69-
wrap_function_wrapper(threading.Timer, 'run',
70-
ThreadingInstrumentor.__wrap_threading_run)
71+
wrap_function_wrapper(
72+
threading.Timer,
73+
"start",
74+
ThreadingInstrumentor.__wrap_threading_start,
75+
)
76+
wrap_function_wrapper(
77+
threading.Timer, "run", ThreadingInstrumentor.__wrap_threading_run
78+
)
7179

7280
@staticmethod
7381
def _uninstrument_thread():

instrumentation/opentelemetry-instrumentation-threading/tests/test_threading.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ def test_trace_context_propagation_in_thread(self):
3939
self.run_threading_test(threading.Thread(target=self.fake_func))
4040

4141
def test_trace_context_propagation_in_timer(self):
42-
self.run_threading_test(threading.Timer(
43-
interval=1, function=self.fake_func))
42+
self.run_threading_test(
43+
threading.Timer(interval=1, function=self.fake_func)
44+
)
4445

4546
def run_threading_test(self, thread: threading.Thread):
4647
with self.get_root_span() as span:

0 commit comments

Comments
 (0)