Skip to content

Commit 869e41b

Browse files
committed
strip ruamel end-of-doc marker
Signed-off-by: Taeseung Sohn <taeseung.sohn@tier4.jp>
1 parent 65b5d18 commit 869e41b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/scripts/sync_params.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,9 @@ def _render_yaml_value(value: Any) -> str:
369369
"""
370370
stream = io.StringIO()
371371
_YAML_RT.dump(value, stream)
372-
return stream.getvalue().rstrip("\n")
372+
# ruamel appends "\n...\n" (YAML document-end marker) when dumping bare scalars;
373+
# strip it so the output stays on a single line for scalar values.
374+
return stream.getvalue().rstrip("\n").removesuffix("\n...")
373375

374376

375377
def _find_first_value_line(lines: list[str], key_line_idx: int, key_indent: int) -> int | None:

0 commit comments

Comments
 (0)