projects
/
python_utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tweak histograms in executors to include seconds label.
[python_utils.git]
/
text_utils.py
diff --git
a/text_utils.py
b/text_utils.py
index 94df3e3499756a86955ebc3ee7330e5329720255..741e2a30dacd94306ac79a9c1cce4cc416b67e3f 100644
(file)
--- a/
text_utils.py
+++ b/
text_utils.py
@@
-87,6
+87,8
@@
def bar_graph(
if whole_width == width:
whole_width -= 1
part_char = "▉"
if whole_width == width:
whole_width -= 1
part_char = "▉"
+ elif whole_width == 0 and percentage > 0.0:
+ part_char = "▏"
else:
remainder_width = (percentage * width) % 1
part_width = math.floor(remainder_width * 8)
else:
remainder_width = (percentage * width) % 1
part_width = math.floor(remainder_width * 8)
@@
-136,9
+138,7
@@
def distribute_strings(
return retval
return retval
-def justify_string_by_chunk(
- string: str, width: int = 80, padding: str = " "
-) -> str:
+def justify_string_by_chunk(string: str, width: int = 80, padding: str = " ") -> str:
"""
Justifies a string.
"""
Justifies a string.