Skip to content

Commit 02369bf

Browse files
committed
fix formatting
1 parent df0baae commit 02369bf

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

  • opentelemetry-sdk/src/opentelemetry/sdk/_shared_internal

opentelemetry-sdk/src/opentelemetry/sdk/_shared_internal/__init__.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,21 @@ def worker(self):
169169
self._worker_awaken.clear()
170170
self._export(BatchExportStrategy.EXPORT_ALL)
171171

172-
def _export(self, batch_strategy: BatchExportStrategy, flush_should_end: Optional[float] = None) -> bool:
172+
def _export(
173+
self,
174+
batch_strategy: BatchExportStrategy,
175+
flush_should_end: Optional[float] = None,
176+
) -> bool:
173177
# Returns True if all batches were exported, False if flush_should_end was reached.
174178
with self._export_lock:
175179
iteration = 0
176180
# We could see concurrent export calls from worker and force_flush. We call _should_export_batch
177181
# once the lock is obtained to see if we still need to make the requested export.
178182
while self._should_export_batch(batch_strategy, iteration):
179-
if flush_should_end is not None and time.time() >= flush_should_end:
183+
if (
184+
flush_should_end is not None
185+
and time.time() >= flush_should_end
186+
):
180187
return False
181188
iteration += 1
182189
token = attach(set_value(_SUPPRESS_INSTRUMENTATION_KEY, True))

0 commit comments

Comments
 (0)