MCPcopy Create free account
hub / github.com/BasisResearch/lean.py / collect_sorrys

Method collect_sorrys

lean_py/kernel.py:388–393  ·  view source on GitHub ↗

Extract all `sorry` placeholders in ``source`` as a draftable :class:`GoalState`. Returns ``(state, message)`` — state is ``None`` if no sorries were found.

(self, source: str)

Source from the content-addressed store, hash-verified

386 return self._lib.leanpy_kernel_frontend_process(source)
387
388 def collect_sorrys(self, source: str) -> tuple[GoalState | None, str]:
389 """Extract all `sorry` placeholders in ``source`` as a draftable
390 :class:`GoalState`. Returns ``(state, message)`` — state is ``None`` if
391 no sorries were found."""
392 handle, msg = self._lib.leanpy_kernel_frontend_collect_sorrys(source)
393 return (GoalState(self, handle) if handle is not None else None, msg)
394
395 # -- delab utilities -------------------------------------------------
396

Callers 2

mainFunction · 0.95

Calls 1

GoalStateClass · 0.85

Tested by 1