Readable node label for tables and summaries.
(node: dict | None, fallback: str = "")
| 1204 | |
| 1205 | |
| 1206 | def node_display_name(node: dict | None, fallback: str = "") -> str: |
| 1207 | """Readable node label for tables and summaries.""" |
| 1208 | if not node: |
| 1209 | return str(fallback or "") |
| 1210 | label = str(node.get("label") or node.get("id") or fallback or "") |
| 1211 | return humanize_label(label, node.get("source_file", "")) |
| 1212 | |
| 1213 | |
| 1214 | def format_node_refs(node_ids: set, node_by_id: dict, lang: str, empty_text: str, limit: int = 3) -> str: |
no test coverage detected