More mypy cleanup... ugh.
[python_utils.git] / text_utils.py
index cfed1699dc3f29090a7846bff8dc2d3c89fa9174..741e2a30dacd94306ac79a9c1cce4cc416b67e3f 100644 (file)
@@ -87,6 +87,8 @@ def bar_graph(
     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)