summary_table#

scikitplot.cleanprompt.summary_table(result, reveal=False, color=None, stream=None)[source]#

Render a table of what was redacted.

Parameters:
resultRedactionResult

The pass to describe.

revealbool, default=False

When True, include the original values. Off by default: a summary is the thing most likely to be pasted into a ticket or a log.

colorbool, optional

Explicit override; see should_colorize.

streamfile-like, optional

Destination used to detect a terminal.

Returns:
str

A plain-text table, or a note when nothing was redacted.

Parameters:
  • result (RedactionResult)

  • reveal (bool)

  • color (bool | None)

  • stream (Any | None)

Return type:

str

Notes

Developer notes. reveal defaults to False because upstream printed every secret on one line unconditionally ("Removed sensitive information: " + ", ".join(...)), which puts personal data into terminal scrollback, shell transcripts and any captured log.

Examples

>>> from ._engine import Redactor
>>> print(summary_table(Redactor().redact("no secrets here"), color=False))
no sensitive values detected