Skip to content
Myr

Docs: progressbar fixes

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

authored by Julen Ruiz Aizpuru · committed by Julen Ruiz Aizpuru · parent c5d53f8 · Browse files · 2 files+6 added−6 removed
This commit

State

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

Diff stats

2 files+6 added−6 removed

  • other:+6 added−6 removed

2 files+6 added−6 removed

modified:click/termui.py+5 added-5 removed
196 unmodified lines
197198 The context manager creates the progress bar. When the context199 manager is entered the progress bar is already displayed. With every200 iteration over the progress bar the iterable passed to the bar is201 advanced and the bar is updated. When the context manager is exited201 advanced and the bar is updated. When the context manager exits202 a newline is printed and the progress bar is finalized on screen.203204 No printing must happen or the progress bar will be unintentionally205 destroyed.
8 unmodified lines
214215 :param iterable: an iterable to iterate over. If not provided the length216 is required.217 :param length: the number of items to iterate over. By default the218 progressbar will attempt to ask the iterator about it's219 length with might or might not work. If an iterable is218 progressbar will attempt to ask the iterator about its219 length, which might or might not work. If an iterable is220 also provided this parameter can be used to override the221 length. If an iterable is not provided the progress bar222 will iterate over a range of that length.223 :param label: the label to show next to the progress bar.
3 unmodified lines
227 :param show_percent: enables or disables the percentage display. The228 default is `True` if the iterable has a length or229 `False` if not.230 :param show_pos: enables or disables the absolute position display. The231 deafult is `False` if the iterable has a length or231 default is `False` if the iterable has a length or232 `True` if not.233 :param fill_char: the character to use to show the filled part of the234 progress bar.235 :param empty_char: the character to use to show the non filled part of235 :param empty_char: the character to use to show the non-filled part of236 the progress bar.237 :param bar_template: the format string to use as template for the bar.238 The parameters in it are ``label`` for the label,239 ``bar`` for the progress bar and ``info`` for the
12 unmodified lines
modified:docs/utils.rst+1 added-1 removed
173 unmodified lines
174 for user in bar:175 modify_the_user(user)176177Another useful feature is to associate a label with the progress bar which178will be shown before next to the progress bar::178will be shown preceding the progress bar::179180 with click.progressbar(all_the_users_to_process,181 label='Modifying user accounts',182 length=number_of_users) as bar:
2 unmodified lines