MCPcopy
hub / github.com/kvcache-ai/ktransformers / print_dependency_table

Function print_dependency_table

kt-kernel/python/cli/utils/console.py:92–116  ·  view source on GitHub ↗

Print a dependency status table.

(deps: list[dict])

Source from the content-addressed store, hash-verified

90
91
92def print_dependency_table(deps: list[dict]) -> None:
93 """Print a dependency status table."""
94 table = Table(title=t("install_checking_deps"))
95 table.add_column(t("version_info"), style="bold")
96 table.add_column("Current")
97 table.add_column("Required")
98 table.add_column("Status")
99
100 for dep in deps:
101 status = dep.get("status", "ok")
102 if status == "ok":
103 status_str = f"[success]{t('install_dep_ok')}[/success]"
104 elif status == "outdated":
105 status_str = f"[warning]{t('install_dep_outdated')}[/warning]"
106 else:
107 status_str = f"[error]{t('install_dep_missing')}[/error]"
108
109 table.add_row(
110 dep["name"],
111 dep.get("installed", "-"),
112 dep.get("required", "-"),
113 status_str,
114 )
115
116 console.print(table)
117
118
119def confirm(message: str, default: bool = True) -> bool:

Callers

nothing calls this directly

Calls 3

tFunction · 0.90
getMethod · 0.45
printMethod · 0.45

Tested by

no test coverage detected