@@ -275,11 +275,17 @@ class Tree(Generic[TreeDataType], ScrollView, can_focus=True):
275275 }
276276
277277 show_root = reactive (True )
278+ """bool: Show the root of the tree."""
278279 hover_line = var (- 1 )
280+ """int: The line number under the mouse pointer, or -1 if not under the mouse pointer."""
279281 cursor_line = var (- 1 )
282+ """int: The line with the cursor, or -1 if no cursor."""
280283 show_guides = reactive (True )
284+ """bool: Enable display of tree guide lines."""
281285 guide_depth = reactive (4 , init = False )
286+ """int: The indent depth of tree nodes."""
282287 auto_expand = var (True )
288+ """bool: Auto expand tree nodes when clicked."""
283289
284290 LINES : dict [str , tuple [str , str , str , str ]] = {
285291 "default" : (
@@ -395,6 +401,8 @@ def render_label(
395401
396402 Args:
397403 node (TreeNode[TreeDataType]): A tree node.
404+ base_style (Style): The base style of the widget.
405+ style (Style): The additional style for the label.
398406
399407 Returns:
400408 Text: A Rich Text object containing the label.
@@ -470,9 +478,11 @@ def get_node_at_line(self, line_no: int) -> TreeNode[TreeDataType] | None:
470478 return line .node
471479
472480 def validate_cursor_line (self , value : int ) -> int :
481+ """Prevent cursor line from going outside of range."""
473482 return clamp (value , 0 , len (self ._tree_lines ) - 1 )
474483
475484 def validate_guide_depth (self , value : int ) -> int :
485+ """Restrict guide depth to reasonable range."""
476486 return clamp (value , 2 , 10 )
477487
478488 def _invalidate (self ) -> None :
0 commit comments