RenderableAndLineAnnotations

RenderableAndLineAnnotations#

class penzai.treescope.foldable_representation.part_interface.RenderableAndLineAnnotations[source]#

Bases: object

Groups a main renderable with some line comments.

This can be produced by handlers that want to “float” some comments to the right, past any delimiters that may follow the object of interest.

This is not itself a renderable tree part; it should be expanded by basic_parts.build_full_line_with_annotations or a similar function before being displayed.

Variables:
  • renderable (RenderableTreePart) – The main object to render.

  • annotations (RenderableTreePart | None) – Annotations for the main object, which should be a single line and will be floated to the right past any delimiters.

Methods

__init__(renderable[, annotations])

Attributes

annotations

renderable