mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-12-25 20:54:34 +00:00
Fix some formatting issues
This commit is contained in:
parent
c9d593ef4f
commit
8767fdf367
5
sync.py
5
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:
|
||||
|
|
Loading…
Reference in a new issue