MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / _write_lf

Function _write_lf

scripts/strip-inbody-comments.py:212–215  ·  view source on GitHub ↗

Write `text` as UTF-8 with LF endings on every platform.

(path: Path, text: str)

Source from the content-addressed store, hash-verified

210
211
212def _write_lf(path: Path, text: str) -> None:
213 """Write `text` as UTF-8 with LF endings on every platform."""
214 normalized = text.replace("\r\n", "\n").replace("\r", "\n")
215 path.write_bytes(normalized.encode("utf-8"))
216
217
218def main(argv: list[str]) -> int:

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected