Skip to content

Commit d28ed8b

Browse files
logging.py: Make time_str optional
If `time_str` is empty, it shouldn't add a space to the list of parts.
1 parent 8543895 commit d28ed8b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/yosys_mau/task_loop/logging.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ def default_formatter(event: LogEvent):
7272
parts: list[str] = []
7373
if context.app_name:
7474
parts.append(f"{click.style(context.app_name, fg='blue')} ")
75-
parts.append(f"{click.style(time_str, fg='green')} ")
75+
if time_str:
76+
parts.append(f"{click.style(time_str, fg='green')} ")
7677
if context.work_dir:
7778
parts.append(f"[{click.style(context.work_dir, fg='blue')}] ")
7879
if context.scope:

0 commit comments

Comments
 (0)