chore: fix some ruff warnings since version upgrade#1
Open
matmut7 wants to merge 3 commits intopeterjdolan:tqdmfrom
Open
chore: fix some ruff warnings since version upgrade#1matmut7 wants to merge 3 commits intopeterjdolan:tqdmfrom
matmut7 wants to merge 3 commits intopeterjdolan:tqdmfrom
Conversation
Many long-running commands produce little or no feedback in the terminal to indicate that they're progressing, and none of them provide estimates of how long the operation will run. This change introduces the `enlighten` python package, which displays progress bars akin to TQDM below the existing terminal output. To support consistent use and presentation of the progress bars, and to allow for future modification, we introduce two methods to beets.ui - beets.ui.iprogress_bar, and beets.ui.changed_unchanged_error_pbars - which can be used by Beets' core commands and all Beets plugins. Example usage is provided in the methods' documentation. Integrating progress bars into the 'import' command required a more custom implementation than the beets.ui.* commands could support. The approach taken is certainly open to discussion. Notably, the Enlighten library does not work as well in Windows PowerShell as it does in a linux terminal (manually tested in Zsh), so the progress bars are disabled in Windows environments. Resolving these issues and enabling them in Windows is left as future work.
7ab870e to
f42279b
Compare
523c8f1 to
373e372
Compare
5bd0bb8 to
4360907
Compare
abb896d to
6b163fe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
I came accross this PR on the beets project and I guess it was blocked because of some Ruff upgrade that created new warnings. I found that these issues were easily fixed with
poe lint --fix --unsafe-fixesnow that the Ruff versions mixup has been settled.I'm really interested in this progress output feature to be released. Sadly, the merge conflicts remaining once I fixed the lint issues are difficult for me to handle. Nevertheless, I'd be glad to lend you a hand if needed.