RendersAsRootInIPython

RendersAsRootInIPython#

class penzai.treescope.figures.RendersAsRootInIPython[source]#

Bases: RenderableTreePart

Base class / mixin that implements _repr_html_ for treescope parts.

Subclasses of this class will render themselves as rich display objects when displayed in IPython, instead of having their contents formatted with a pretty printer or repr.

Inherited Attributes

collapsed_width

The length of this rendering if collapsed in one line, in characters.

newlines_in_expanded_parent

The number of newlines in this rendering if in an expanded parent.

tags_in_this_part

Returns a set of "tag" objects contained in this part.

Attributes

collapsed_width

The length of this rendering if collapsed in one line, in characters.

newlines_in_expanded_parent

The number of newlines in this rendering if in an expanded parent.

tags_in_this_part

Returns a set of "tag" objects contained in this part.

Inherited Methods

(expand to view inherited methods)

__init__()

foldables_in_this_part()

Returns a collection of foldables contained in this node.

html_setup_parts(context, /)

Returns a set of setup strings for this part.

render_to_html(stream, *[, at_beginning_of_line])

Renders this tree part to an HTML source string.

render_to_text(stream, *, expanded_parent, ...)

Renders this tree part to a plain-text string.