MCPcopy
hub / github.com/satwikkansal/wtfpython / inspect_and_sanitize_code_lines

Function inspect_and_sanitize_code_lines

irrelevant/notebook_generator.py:193–202  ·  view source on GitHub ↗
(lines)

Source from the content-addressed store, hash-verified

191
192
193def inspect_and_sanitize_code_lines(lines):
194 tokens_to_remove = STATEMENT_PREFIXES
195 result = []
196 is_print_present = False
197 for line in lines:
198 line = remove_from_beginning(tokens_to_remove, line)
199 if line.startswith("print ") or line.startswith("print("):
200 is_print_present = True
201 result.append(line)
202 return is_print_present, result
203
204
205def convert_to_cells(cell_contents, read_only):

Callers 1

convert_to_cellsFunction · 0.85

Calls 1

remove_from_beginningFunction · 0.85

Tested by

no test coverage detected