Skip to content

Commit bdeb3d1

Browse files
committed
Lint
1 parent c86e1c1 commit bdeb3d1

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

tests/helpers/__init__.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -336,12 +336,7 @@ async def print_interleaved_histories(
336336
event_time = event_time.astimezone(timezone.utc).replace(tzinfo=None)
337337
all_events.append((handle, event_str, None, event_time))
338338

339-
# Find the earliest start time across all workflows
340-
if workflow_start_times:
341-
zero_time = min(workflow_start_times.values())
342-
else:
343-
# If no workflows, use the earliest extra event time if available
344-
zero_time = min((event[3] for event in all_events), default=None)
339+
zero_time = min(workflow_start_times.values())
345340

346341
all_events.sort(key=lambda item: item[3])
347342
col_width = 50
@@ -356,11 +351,7 @@ def _format_row(items: list[str], truncate: bool = False) -> str:
356351
print("-" * (col_width * len(handles) + len(handles) - 1))
357352

358353
for handle, event, event_num, event_time in all_events:
359-
# Calculate elapsed time in milliseconds from the zero point
360-
if zero_time:
361-
elapsed_ms = int((event_time - zero_time).total_seconds() * 1000)
362-
else:
363-
elapsed_ms = 0
354+
elapsed_ms = int((event_time - zero_time).total_seconds() * 1000)
364355

365356
if isinstance(event, str):
366357
event_desc = f" *: {elapsed_ms:>4} {event}"

0 commit comments

Comments
 (0)