diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-07-13 05:37:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-07-13 05:37:58 +0000 |
commit | 335c010ac5fbaf2bc33cb7f28ceac3d5bfffb677 (patch) | |
tree | 35bf32721245769d8287281a8a85ba1e3fcb40d9 /gita/utils.py | |
parent | Releasing debian version 0.16.3-2. (diff) | |
download | gita-335c010ac5fbaf2bc33cb7f28ceac3d5bfffb677.tar.xz gita-335c010ac5fbaf2bc33cb7f28ceac3d5bfffb677.zip |
Merging upstream version 0.16.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gita/utils.py')
-rw-r--r-- | gita/utils.py | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/gita/utils.py b/gita/utils.py index 76aebce..6746d7f 100644 --- a/gita/utils.py +++ b/gita/utils.py @@ -5,7 +5,7 @@ import csv import asyncio import platform import subprocess -from functools import lru_cache, partial +from functools import lru_cache from pathlib import Path from typing import List, Dict, Coroutine, Union, Iterator, Tuple from collections import Counter, defaultdict @@ -431,18 +431,14 @@ def describe(repos: Dict[str, Dict[str, str]], no_colors: bool = False) -> str: """ if repos: name_width = len(max(repos, key=len)) + 1 - funcs = info.get_info_funcs() - - get_repo_status = info.get_repo_status - if get_repo_status in funcs and no_colors: - idx = funcs.index(get_repo_status) - funcs[idx] = partial(get_repo_status, no_colors=True) + funcs = info.get_info_funcs(no_colors=no_colors) num_threads = min(multiprocessing.cpu_count(), len(repos)) with ThreadPoolExecutor(max_workers=num_threads) as executor: for line in executor.map( - lambda repo: f'{repo:<{name_width}}{" ".join(f(repos[repo]) for f in funcs)}', - sorted(repos)): + lambda name: f'{name:<{name_width}}{" ".join(f(repos[name]) for f in funcs)}', + sorted(repos), + ): yield line |