diff options
Diffstat (limited to '')
-rw-r--r-- | gita/info.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/gita/info.py b/gita/info.py index d18a097..ee302d0 100644 --- a/gita/info.py +++ b/gita/info.py @@ -1,6 +1,5 @@ import os import csv -import yaml import subprocess from enum import Enum from pathlib import Path @@ -34,6 +33,15 @@ class Color(str, Enum): underline = '\x1B[4m' +default_colors = { + 'no-remote': Color.white.name, + 'in-sync': Color.green.name, + 'diverged': Color.red.name, + 'local-ahead': Color.purple.name, + 'remote-ahead': Color.yellow.name, + } + + def show_colors(): # pragma: no cover """ @@ -61,13 +69,7 @@ def get_color_encoding() -> Dict[str, str]: reader = csv.DictReader(f) colors = next(reader) else: - colors = { - 'no-remote': Color.white.name, - 'in-sync': Color.green.name, - 'diverged': Color.red.name, - 'local-ahead': Color.purple.name, - 'remote-ahead': Color.yellow.name, - } + colors = default_colors return colors |