Skip to content

AI spam#3668

Closed
Hasnaathussain wants to merge 1 commit into
pallets:mainfrom
Hasnaathussain:fix/3571-progressbar-show-pos-min-steps
Closed

AI spam#3668
Hasnaathussain wants to merge 1 commit into
pallets:mainfrom
Hasnaathussain:fix/3571-progressbar-show-pos-min-steps

Conversation

@Hasnaathussain

@Hasnaathussain Hasnaathussain commented Jul 7, 2026

Copy link
Copy Markdown

When update_min_steps is configured with a value that is not a divisor of the progress bar's total length, any remaining updates at the end that are fewer than update_min_steps are not flushed to self.pos. When show_pos=True, this leaves the final display at less than the total count (e.g. 14/20 instead of 20/20), even though self.finished becomes True and percentage shows 100%.

This PR updates the finish method of ProgressBar to flush any remaining uncompleted intervals to self.pos by calling make_step().

A regression test has been added to tests/test_termui.py.

When update_min_steps is specified and not a divisor of the total length, the progress bar completion state (such as the item position fraction show_pos) remains undercounted because the final updates are discarded. Flushing any trailing completed steps ensures the progress bar shows full completion upon finishing.
@ThiefMaster ThiefMaster changed the title fix: flush remaining completed intervals in progressbar finish AI spam Jul 7, 2026
@ThiefMaster ThiefMaster closed this Jul 7, 2026
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.

2 participants