jsonschema_diff.table_render¶
Clean, modular implementation of rich-based legend tables (v2).
Changes v2¶
Robust renderable detection – supports returning any Rich renderable (Text, Panel, Table, etc.) directly from a column‑processor.
ANSI bleed fixed: we never coerce unknown objects to str; if value isn’t recognised we call repr() (safe, no control codes).
Lists can mix str and Rich renderables – all rendered in a nested grid with rules between blocks.
Helper ColumnConfig.wrap=False to suppress cell padding when renderable already has its own framing (e.g. Panel).
Ratio now respected (outer Table(expand=True, width=table_width)), still no max_width.
Attributes¶
Classes¶
Display‑ready cell. |
|
Facade to build a table from legend classes. |
Functions¶
|
Module Contents¶
- class LegendRenderer(
- columns: Sequence[ColumnConfig],
- *,
- box_style: rich.box.Box = box.SQUARE_DOUBLE_HEAD,
- header_style: str = 'bold',
- table_width: int | None = None,
- show_outer_lines: bool = True,
- default_overflow: str = 'fold',
Facade to build a table from legend classes.