MCPcopy Index your code
hub / github.com/algorithmicsuperintelligence/openevolve / _write_answer

Function _write_answer

scripts/manual.py:116–125  ·  view source on GitHub ↗
(qdir: Path, task_id: str, answer_text: str)

Source from the content-addressed store, hash-verified

114
115
116def _write_answer(qdir: Path, task_id: str, answer_text: str) -> None:
117 qdir.mkdir(parents=True, exist_ok=True)
118 out = qdir / f"{task_id}.answer.json"
119 tmp = qdir / f".{task_id}.answer.json.tmp"
120
121 answer_text = _normalize_newlines(answer_text)
122
123 payload = {"id": task_id, "answer": answer_text}
124 tmp.write_text(json.dumps(payload, ensure_ascii=False, indent=2), encoding="utf-8")
125 tmp.replace(out)
126
127
128def create_manual_blueprint(get_visualizer_path: Callable[[], str]) -> Blueprint:

Callers 1

api_task_answerFunction · 0.85

Calls 1

_normalize_newlinesFunction · 0.85

Tested by

no test coverage detected