Closed jdvanwijk closed 1 day ago
Example use:
class WideTree(Tree):
ASCII_GUIDES = (" ", "| ", "+------- ", "`------- ")
TREE_GUIDES = [
(" ", "│ ", "├────── ", "└────── "),
(" ", "┃ ", "┣━━━━━━ ", "┗━━━━━━ "),
(" ", "║ ", "╠══════ ", "╚══════ "),
]
Type of changes
Checklist
Description
In the Tree class, I have promoted the ASCII_GUIDES and TREE_GUIDES constants (previously located within the __rich_console__ method) to class attributes. Additionally, I have updated the Tree class docstring to reflect this change.
This modification simplifies the process of customizing the appearance of tree guides. Users can now easily inherit from the Tree class and modify its class attributes directly, rather than delving into the __rich_console__ method.