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:
- Return type:
Notes
Developer notes.
revealdefaults toFalsebecause 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