Add a docstring to action_toggle_node

I want to add docstrings to the actions I'm adding as part of #1700, so with
this in mind I'm going to add docstrings to all the actions.
This commit is contained in:
Dave Pearson
2023-01-31 12:48:19 +00:00
parent 5c17bc3482
commit 775165ec12

View File

@@ -1015,6 +1015,13 @@ class Tree(Generic[TreeDataType], ScrollView, can_focus=True):
self._toggle_node(line.path[-1])
def action_select_cursor(self) -> None:
"""Cause a select event for the target node.
Note:
If `auto_expand` is `True` use of this action on a non-leaf node
will cause both an expand/collapse event to occour, as well as a
selected event.
"""
try:
line = self._tree_lines[self.cursor_line]
except IndexError: