MCPcopy Create free account
hub / github.com/bigdra50/unity-cli / print_key_value

Function print_key_value

unity_cli/cli/output.py:570–581  ·  view source on GitHub ↗

Print dict as key-value pairs.

(data: dict[str, Any], title: str | None = None)

Source from the content-addressed store, hash-verified

568
569
570def print_key_value(data: dict[str, Any], title: str | None = None) -> None:
571 """Print dict as key-value pairs."""
572 if console.no_color:
573 for key, value in data.items():
574 print(f"{sanitize_tsv(str(key))}\t{sanitize_tsv(str(value))}")
575 return
576
577 if title:
578 console.print(f"[bold]{escape(title)}[/bold]")
579
580 for key, value in data.items():
581 console.print(f" [cyan]{escape(str(key))}:[/cyan] {escape(str(value))}")

Calls 1

sanitize_tsvFunction · 0.85