(solution,eofs)
| 114 | |
| 115 | |
| 116 | def sanitize_solution(solution,eofs): |
| 117 | task_id = solution["task_id"] |
| 118 | dbg_identifier = task_id |
| 119 | entry_point = solution["entry_point"] |
| 120 | |
| 121 | old_code = solution["solution"] |
| 122 | old_code = old_code.strip() |
| 123 | |
| 124 | new_code = sanitize( |
| 125 | code=old_code, |
| 126 | entrypoint=entry_point, |
| 127 | ).strip() |
| 128 | |
| 129 | # if changed, print the message |
| 130 | if new_code != old_code: |
| 131 | msg = "Sanitized: " + dbg_identifier |
| 132 | print(msg) |
| 133 | solution["solution"]=new_code |
| 134 | return solution |
| 135 | |
| 136 | |
| 137 |
no test coverage detected