Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add update interval for progress bar #1698

Merged
merged 1 commit into from Nov 1, 2020

Conversation

srafi1
Copy link
Contributor

@srafi1 srafi1 commented Oct 26, 2020

Adds an optional update_interval for progress bars that allows the user to skip unnecessary renders for frequently updated iterators.

Checklist:

  • Add tests that demonstrate the correct behavior of the change. Tests should fail without the change.
  • Add or update relevant docs, in the docs folder and in code.
  • Add an entry in CHANGES.rst summarizing the change and linking to the issue.
  • Add .. versionchanged:: entries in any relevant code docs.
  • Run pre-commit hooks and fix any issues.
  • Run pytest and tox, no tests failed.

@srafi1 srafi1 marked this pull request as ready for review October 26, 2020 01:10
@davidism
Copy link
Member

This is a good PR, but it's making me realize we're just slowly reimplementing tqdm without the design and focus of that library. I'll merge this, but I think I'm going to close any other progress bar feature requests.

src/click/termui.py Show resolved Hide resolved
src/click/_termui_impl.py Outdated Show resolved Hide resolved
@davidism davidism added the f:progress bar feature: progress bar label Nov 1, 2020
@davidism davidism added this to the 8.0.0 milestone Nov 1, 2020
@davidism davidism merged commit acc91bc into pallets:master Nov 1, 2020
@srafi1 srafi1 deleted the progressbar-update-intervals branch November 1, 2020 02:36
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
f:progress bar feature: progress bar
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avoid rendering on highly frequent updates in progressbar
2 participants