MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / format_multiline_comment

Function format_multiline_comment

scripts/replace_copyright.py:157–164  ·  view source on GitHub ↗
(text, comment_type)

Source from the content-addressed store, hash-verified

155
156
157def format_multiline_comment(text, comment_type):
158 if comment_type == PY_COMMENTS:
159 text = f"\n{comment_type[2]}\n" + "\n".join(text) + f"{comment_type[2]}"
160 if comment_type == C_COMMENTS:
161 text = f"\n{comment_type[1]}\n" + "\n".join(text) + f"{comment_type[2]}"
162 if comment_type == BASH_COMMENTS:
163 text = "\n".join([f"{comment_type[0]}{l}" for l in text])
164 return text
165
166
167def modify_file_header(fp, file_header, rest_of_file, preserve_text_store, comment_type):

Callers 1

modify_file_headerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected