Update typing and documentation on renderers.

This commit is contained in:
Mike Auty
2019-10-07 10:35:17 +01:00
parent b8f22bea7a
commit 9b0a910d7e
+3 -1
View File
@@ -194,7 +194,7 @@ class TreeGrid(object, metaclass = ABCMeta):
@abstractmethod
def visit(self,
node: TreeNode,
node: Optional[TreeNode],
function: VisitorSignature,
initial_accumulator: _Type,
sort_key: ColumnSortKey = None) -> None:
@@ -207,6 +207,8 @@ class TreeGrid(object, metaclass = ABCMeta):
be set based on a sort_key function which should accept a node's values and return something that can be
sorted to receive the desired order (similar to the sort/sorted key).
If node is None, then the root node is used.
Args:
node: The initial node to be visited
function: The visitor to apply to the nodes under the initial node