MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / write_outputs

Function write_outputs

scripts/developer-guide/summarize_reports.py:59–77  ·  view source on GitHub ↗
(entries: Iterable[tuple[str, str]], output: Path | None)

Source from the content-addressed store, hash-verified

57
58
59def write_outputs(entries: Iterable[tuple[str, str]], output: Path | None) -> None:
60 lines: list[str] = []
61 for key, value in entries:
62 delimiter = ""
63 if "\n" in value:
64 delimiter = "__GH_OUTPUT__"
65 while delimiter in value:
66 delimiter += "_X"
67 lines.append(f"{key}<<{delimiter}\n{value}\n{delimiter}")
68 else:
69 lines.append(f"{key}={value}")
70
71 content = "\n".join(lines) + "\n"
72 if output:
73 output.parent.mkdir(parents=True, exist_ok=True)
74 with output.open("a", encoding="utf-8") as fh:
75 fh.write(content)
76 else:
77 print(content, end="")
78
79
80def _normalize_status(status: str) -> str:

Callers 5

summarize_asciidocFunction · 0.85
summarize_valeFunction · 0.85
summarize_languagetoolFunction · 0.85
summarize_unused_imagesFunction · 0.85

Calls 5

appendMethod · 0.65
joinMethod · 0.65
openMethod · 0.65
writeMethod · 0.65
mkdirMethod · 0.45

Tested by

no test coverage detected