FoldCondition#
- class penzai.treescope.foldable_representation.basic_parts.FoldCondition[source]#
Bases:
RenderableTreePartRenders conditionally depending on whether it’s collapsed or expanded.
- Variables:
collapsed (RenderableTreePart) – Contents to render when parent is collapsed.
expanded (RenderableTreePart) – Contents to render when parent is expanded.
Inherited Attributes
collapsed_widthThe length of this rendering if collapsed in one line, in characters.
newlines_in_expanded_parentThe number of newlines in this rendering if in an expanded parent.
tags_in_this_partReturns a set of "tag" objects contained in this part.
Methods
__init__([collapsed, expanded])foldables_in_this_part()html_setup_parts(context)render_to_html(stream, *[, at_beginning_of_line])render_to_text(stream, *, expanded_parent, ...)Attributes
collapsedcollapsed_widthThe length of this rendering if collapsed in one line, in characters.
expandednewlines_in_expanded_parentThe number of newlines in this rendering if in an expanded parent.
tags_in_this_partReturns a set of "tag" objects contained in this part.