Skip to content
Myr

:pencil2: fix typo in progressbar/tutorial004.py (#63)

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

In the tutorial, the length of the progress bar is set to 1000 and the update was mistakenly set to 2500. The update should be 1/4 of the length given that the loop runs for 4 iterations. This commit sets the update amount to 250 which better showcases the feature.

authored by Valentin Calomme · committed by GitHub · parent c304d80 · Browse files · 1 file+1 added−1 removed
This commit

State

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

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:docs/src/progressbar/tutorial004.py+1 added-1 removed
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 progress.update(2500)12 progress.update(250)13 typer.echo(f"Processed {total} things in batches.")141516if __name__ == "__main__":
1 unmodified line