Render a simple markdown table.
(headers: List[str], rows: List[List[Any]])
| 96 | |
| 97 | |
| 98 | def _table(headers: List[str], rows: List[List[Any]]) -> str: |
| 99 | """Render a simple markdown table.""" |
| 100 | sep = " | ".join("---" for _ in headers) |
| 101 | head = " | ".join(headers) |
| 102 | body = "\n".join(" | ".join(str(c) for c in row) for row in rows) |
| 103 | return f"| {head} |\n| {sep} |\n" + "\n".join(f"| {' | '.join(str(c) for c in r)} |" for r in rows) |
| 104 | |
| 105 | |
| 106 | def _code_block(cypher: str) -> str: |
no outgoing calls
no test coverage detected