diff --git a/sync.py b/sync.py index 170661e..069a74b 100755 --- a/sync.py +++ b/sync.py @@ -12,7 +12,6 @@ from enum import Enum, auto from pathlib import Path from typing import NamedTuple, Optional - try: import rich except ImportError: @@ -186,6 +185,7 @@ def print_report(diffs: Iterable[FileDiff]) -> None: return from rich.table import Table + table = Table() table.add_column("Status") table.add_column("System file", style="magenta") @@ -195,7 +195,7 @@ def print_report(diffs: Iterable[FileDiff]) -> None: _str_status = diff.status.name.replace("_", " ") match diff.status: case DiffStatus.MATCH: - status_str = (f"[green]{_str_status}[/green]") + status_str = f"[green]{_str_status}[/green]" case DiffStatus.PERMISSION_ERROR: status_str = f"[bold yellow]{_str_status}[/bold yellow]" case DiffStatus.NOT_FOUND: @@ -306,7 +306,6 @@ def apply_fix(diff: FileDiff) -> None: return - def show_diffs(diffs: Iterable[FileDiff], ask_show_diff: bool, apply_fix_prompt: bool) -> None: for diff in diffs: match diff.status: