Skip to content

fontlabapp.proof.reports.model · declarations 001

Back to fontlabapp.proof.reports.model

format_report

format_report(report: Any, *, deadline: float | None = None, clock: Callable = monotonic, cancelled: Callable = lambda: False) -> str

Serialize complete Unicode JSON; optional budgets check every encoder chunk.

Default text is unchanged. Scalar formatting and final join are synchronous operations checked on return. Never truncate rows or publish partial JSON.

show_report

show_report(report: Any, *, title: str = 'Report', key: str = 'json-report', deadline: float | None = None, clock: Callable = monotonic, cancelled: Callable = lambda: False) -> Any

Show one read-only nonmodal snapshot; replace only the same owned key.

Complete serialization precedes UI creation. Check before/after the native show call, which cannot be preempted. Overrun raises; an already opened complete report can remain. No active font/Output/preference API is touched. Existing callers retain their unbudgeted defaults and exact JSON text.