ExpandState

ExpandState#

class treescope.rendering_parts.ExpandState[source]#

Bases: Enum

Enum for expand states.

Members:
EXPANDED: Indicates that a foldable node should start expanded. This should

not be modified by automatic formatting logic.

COLLAPSED: Indicates that a foldable node should start collapsed. This

should not be modified by automatic formatting logic.

WEAKLY_EXPANDED: Indicates that a foldable node could start expanded as a

best guess, but that automatic formatting logic is free to collapse it to improve the overall layout.

WEAKLY_COLLAPSED: Indicates that a foldable node could start collapsed as a

best guess, but that automatic formatting logic is free to expand it to improve the overall layout.

Methods

is_weak()

Returns True if this state is weak (e.g. can be changed).

Attributes

EXPANDED

COLLAPSED

WEAKLY_EXPANDED

WEAKLY_COLLAPSED

is_weak() bool[source]#

Returns True if this state is weak (e.g. can be changed).