Skip to content
This repository was archived by the owner on Feb 20, 2026. It is now read-only.

Commit e1f4f44

Browse files
committed
Fix a few regressions
Automated tests cannot catche everything :)
1 parent 7c305fd commit e1f4f44

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

cli_ui/__init__.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ def write_and_flush(fileobj: FileObj, to_write: str) -> None:
232232

233233
def message(
234234
*tokens: Token,
235-
end: str = "",
236-
sep: str = "",
235+
end: str = "\n",
236+
sep: str = " ",
237237
fileobj: FileObj = sys.stdout,
238238
update_title: bool = False
239239
) -> None:
@@ -290,8 +290,10 @@ def info(*tokens: Token, **kwargs: Any) -> None:
290290

291291
def info_section(*tokens: Token, **kwargs: Any) -> None:
292292
""" Print an underlined section name """
293-
kwargs["color"] = False
294-
no_color = _process_tokens(tokens, **kwargs)
293+
# We need to know the length of the section:
294+
process_tokens_kwargs = kwargs.copy()
295+
process_tokens_kwargs["color"] = False
296+
no_color = _process_tokens(tokens, **process_tokens_kwargs)
295297
info(*tokens, **kwargs)
296298
info("-" * len(no_color), end="\n\n")
297299

0 commit comments

Comments
 (0)