Print a version information table.
(versions: dict[str, Optional[str]])
| 75 | |
| 76 | |
| 77 | def print_version_table(versions: dict[str, Optional[str]]) -> None: |
| 78 | """Print a version information table.""" |
| 79 | table = Table(show_header=False, box=None, padding=(0, 2)) |
| 80 | table.add_column("Component", style="bold") |
| 81 | table.add_column("Version") |
| 82 | |
| 83 | for name, version in versions.items(): |
| 84 | if version: |
| 85 | table.add_row(name, f"[success]{version}[/success]") |
| 86 | else: |
| 87 | table.add_row(name, f"[muted]{t('version_not_installed')}[/muted]") |
| 88 | |
| 89 | console.print(table) |
| 90 | |
| 91 | |
| 92 | def print_dependency_table(deps: list[dict]) -> None: |