mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Add a docstring for TreeNode.__init__
This commit is contained in:
@@ -84,6 +84,17 @@ class TreeNode(Generic[TreeDataType]):
|
||||
expanded: bool = True,
|
||||
allow_expand: bool = True,
|
||||
) -> None:
|
||||
"""Initialise the node.
|
||||
|
||||
Args:
|
||||
tree: The tree that the node is being attached to.
|
||||
parent: The parent node that this node is being attached to.
|
||||
id: The ID of the node.
|
||||
label: The label for the node.
|
||||
data: Optional data to associate with the node.
|
||||
expand: Should the node be attached in an expanded state?
|
||||
allow_expand: Should the node allow being expanded by the user?
|
||||
"""
|
||||
self._tree = tree
|
||||
self._parent = parent
|
||||
self._id = id
|
||||
|
||||
Reference in New Issue
Block a user