diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-09-06 04:05:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-09-06 04:05:53 +0000 |
commit | c18286b8746318f614becc9c518452d6b7c47c49 (patch) | |
tree | b63f0fb77dc26d49f03fa711d4118f1d10449020 /gita/info.py | |
parent | Releasing debian version 0.15.2-2. (diff) | |
download | gita-c18286b8746318f614becc9c518452d6b7c47c49.tar.xz gita-c18286b8746318f614becc9c518452d6b7c47c49.zip |
Merging upstream version 0.15.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gita/info.py')
-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 |