MCPcopy Create free account
hub / github.com/NVIDIA/NeMo-Relay / _clean_code

Function _clean_code

scripts/docs/generate_rust_library_reference.py:93–99  ·  view source on GitHub ↗
(value: str)

Source from the content-addressed store, hash-verified

91
92
93def _clean_code(value: str) -> str:
94 lines = _ascii(value).splitlines()
95 while lines and not lines[0].strip():
96 lines.pop(0)
97 while lines and not lines[-1].strip():
98 lines.pop()
99 return "\n".join(line.rstrip() for line in lines)
100
101
102def _mdx_safe_code(value: str) -> str:

Callers 1

_plain_codeFunction · 0.85

Calls 2

_asciiFunction · 0.85
joinMethod · 0.80

Tested by

no test coverage detected