MCPcopy Create free account
hub / github.com/Open-Quant/openquant / cmd_reset

Function cmd_reset

scripts/afml_docs_loop.py:336–352  ·  view source on GitHub ↗
(args: argparse.Namespace)

Source from the content-addressed store, hash-verified

334
335
336def cmd_reset(args: argparse.Namespace) -> int:
337 state = read_state()
338 target_id = args.section_id
339 found = False
340 for chapter, section in iter_sections(state):
341 if section["id"] == target_id:
342 found = True
343 section["status"] = "pending"
344 section.pop("note", None)
345 chapter["status"] = recompute_chapter_status(chapter)
346 break
347 if not found:
348 raise ValueError(f"Unknown section id: {target_id}")
349
350 write_state(state)
351 print(f"Reset to pending: {target_id}")
352 return 0
353
354
355def cmd_export(_args: argparse.Namespace) -> int:

Callers

nothing calls this directly

Calls 4

read_stateFunction · 0.85
iter_sectionsFunction · 0.85
recompute_chapter_statusFunction · 0.85
write_stateFunction · 0.85

Tested by

no test coverage detected