Skip to content

Commit ce487d3

Browse files
Kasper JungeRalphify
authored andcommitted
refactor: inline text alias in collect_output
The local was assigned from `ensure_str(stream)` and read exactly once on the next line as `parts.append(text)`. Inlining matches the alias-inline style from fc5e1cb / 497c028 / 52e0272 — the helper name already documents the decode step. Co-authored-by: Ralphify <noreply@ralphify.co>
1 parent 50d5495 commit ce487d3

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/ralphify/_output.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,9 @@ def collect_output(
7171
parts: list[str] = []
7272
for stream in (stdout, stderr):
7373
if stream:
74-
text = ensure_str(stream)
7574
if parts and not parts[-1].endswith("\n"):
7675
parts.append("\n")
77-
parts.append(text)
76+
parts.append(ensure_str(stream))
7877
return "".join(parts)
7978

8079

0 commit comments

Comments
 (0)