MCPcopy Index your code
hub / github.com/Codeplain-ai/codeplain / _create_progress_bar

Function _create_progress_bar

cli_output/status.py:10–18  ·  view source on GitHub ↗

Create a Unicode progress bar.

(remaining: int, total: int, width: int = 30)

Source from the content-addressed store, hash-verified

8
9
10def _create_progress_bar(remaining: int, total: int, width: int = 30) -> str:
11 """Create a Unicode progress bar."""
12 if total == 0:
13 filled = 0
14 else:
15 filled = int((remaining / total) * width)
16
17 empty = width - filled
18 return "█" * filled + "░" * empty
19
20
21def _display_credit_line(plan_credits: dict) -> None:

Callers 8

test_small_progressMethod · 0.90
test_zero_totalMethod · 0.90
test_custom_widthMethod · 0.90
_display_credit_lineFunction · 0.85

Calls

no outgoing calls

Tested by 6

test_small_progressMethod · 0.72
test_zero_totalMethod · 0.72
test_custom_widthMethod · 0.72