Skip to content

Commit 9c8ce8c

Browse files
committed
Add docstring
1 parent 8d60957 commit 9c8ce8c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/contraqctor/contract/utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@
88

99

1010
def _get_node_icon(node: DataStream, show_missing_indicator: bool) -> str:
11+
"""Determines the icon for a data stream node based on its type and data presence."""
1112
node_icon = _ICON_MAP[node.is_collection]
1213
if not node.has_data and show_missing_indicator:
1314
node_icon += _ICON_MAP[None]
1415
return node_icon
1516

1617

1718
def _build_line_prefix(parents: list[bool], is_last: bool) -> str:
19+
"""Builds the line prefix for a node based on its position in the tree."""
1820
line_prefix = ""
1921
for parent_is_last in parents[:-1]:
2022
line_prefix += " " if parent_is_last else "│ "
@@ -25,6 +27,7 @@ def _build_line_prefix(parents: list[bool], is_last: bool) -> str:
2527

2628

2729
def _build_node_label(node: DataStream, show_type: bool, show_params: bool) -> str:
30+
"""Builds the label for a data stream node, optionally including type and parameters."""
2831
node_label = node.name
2932
if show_type:
3033
node_label += f" [{node.__class__.__name__}]"
@@ -169,6 +172,7 @@ def _get_html_header() -> str:
169172

170173

171174
def _get_tooltip_text(node: DataStream) -> str:
175+
"""Generates the HTML content for a node's tooltip."""
172176
import html as html_module
173177

174178
parts = []

0 commit comments

Comments
 (0)