Document TreeDataType

This commit is contained in:
Dave Pearson
2023-03-01 13:45:32 +00:00
parent fa1f699161
commit 80fd76f1f2
2 changed files with 3 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
::: textual.widgets.Tree
::: textual.widgets._tree.TreeNode
::: textual.widgets._tree.NodeID
::: textual.widgets._tree.TreeDataType

View File

@@ -29,6 +29,8 @@ NodeID = NewType("NodeID", int)
"""The type of an ID applied to a [TreeNode][textual.widgets._tree.TreeNode]."""
TreeDataType = TypeVar("TreeDataType")
"""The type of the data for a given instance of a [Tree][textual.widgets.Tree]."""
EventTreeDataType = TypeVar("EventTreeDataType")
LineCacheKey: TypeAlias = "tuple[int | tuple, ...]"