MCPcopy Create free account
hub / github.com/idank/explainshell / _write_report

Function _write_report

explainshell/manager.py:418–430  ·  view source on GitHub ↗

Write report.json to the run directory.

(run_dir: str, report: ExtractionReport)

Source from the content-addressed store, hash-verified

416
417
418def _write_report(run_dir: str, report: ExtractionReport) -> None:
419 """Write report.json to the run directory."""
420 path = os.path.join(run_dir, "report.json")
421 tmp = path + ".tmp"
422 with open(tmp, "w") as f:
423 f.write(report.model_dump_json(indent=2, exclude_none=True))
424 f.write("\n")
425 os.replace(tmp, path)
426 logger.info("report written to %s", path)
427 # Clean up standalone batch manifest (now embedded in report).
428 manifest_path = os.path.join(run_dir, "batch-manifest.json")
429 if os.path.isfile(manifest_path):
430 os.remove(manifest_path)
431
432
433# ---------------------------------------------------------------------------

Callers 8

test_report_schemaMethod · 0.90
test_reason_embeddedMethod · 0.90
extractFunction · 0.85

Calls

no outgoing calls