Skip to content
Myr

📝 Update the Progress Bar tutorial with correct output (#199)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Nick · committed by GitHub · parent 3b81997 · Browse files · 2 files+3 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Co-authored-by: svlandeg <svlandeg@github.com>

Diff stats

2 files+3 added−1 removed

  • other:+3 added−1 removed

2 files+3 added−1 removed

modified:docs/tutorial/progressbar.md+1 added-1 removed
244 unmodified lines
245246<div class="use-termynal">247<span data-ty="input">python main.py</span>248<span data-ty="progress" data-ty-prompt="Batches"></span>249<span data-ty>Processed 100 things in batches.</span>249<span data-ty>Processed 1000 things in batches.</span>250</div>
modified:docs_src/progressbar/tutorial006.py+2 added
7 unmodified lines
8 with typer.progressbar(length=total) as progress:9 for batch in range(4):10 # Fake processing time11 time.sleep(1)12 # Increment by 250 on each loop iteration13 # (it will take 4 seconds to reach 1000)14 progress.update(250)15 print(f"Processed {total} things in batches.")1617
2 unmodified lines