Skip to content

Fix progressbar final position with update_min_steps#3691

Open
l46983284-cpu wants to merge 1 commit into
pallets:mainfrom
l46983284-cpu:fix/progressbar-show-pos-update-min-steps
Open

Fix progressbar final position with update_min_steps#3691
l46983284-cpu wants to merge 1 commit into
pallets:mainfrom
l46983284-cpu:fix/progressbar-show-pos-update-min-steps

Conversation

@l46983284-cpu

Copy link
Copy Markdown

When update_min_steps holds back the final partial interval, finish() marked the bar complete without applying those steps. Percentage display still looked finished because finished forces 100%, but show_pos kept the last flushed position (for example 14/20).

Apply any pending _completed_intervals in finish() before the final render so show_pos reaches length/length.

fixes #3571

Apply pending steps in finish() so show_pos reaches length/length
when the last interval is below update_min_steps.

Fixes pallets#3571

Signed-off-by: Alex Chen <l46983284@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

click.progressbar doesn't show full completion when using show_pos=True combined with update_min_steps

1 participant