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
Fix broken tqdm
behavior for Windows and older Unix platforms
#4093
Merged
mguaypaq
merged 7 commits into
master
from
jn/2770-fix-tqdm-behavior-on-more-obscure-platforms
Apr 20, 2023
Merged
Fix broken tqdm
behavior for Windows and older Unix platforms
#4093
mguaypaq
merged 7 commits into
master
from
jn/2770-fix-tqdm-behavior-on-more-obscure-platforms
Apr 20, 2023
Conversation
This file contains 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
`ascii=False` forces unicode behavior, even on terminals that don't support it. So, by removing this, we can rely on our newly-added `ascii` settings, which properly account for terminals that don't fully support unicode.
joshuacwnewton
added
enhancement
category: improves performance/results of an existing feature
SCT API: utils.py
context:
labels
Apr 19, 2023
`ascii=False` forces unicode behavior, even on terminals that don't support it. So, by removing this, we can rely on our newly-added `ascii` settings, which properly account for terminals that don't fully support unicode.
Quick addedum: Multiple callers are setting |
`ascii=False` forces unicode behavior, even on terminals that don't support it. So, by removing this, we can rely on our newly-added `ascii` settings, which properly account for terminals that don't fully support unicode.
joshuacwnewton
force-pushed
the
jn/2770-fix-tqdm-behavior-on-more-obscure-platforms
branch
from
April 19, 2023 14:14
9f3c0a4
to
25b0ae2
Compare
mguaypaq
approved these changes
Apr 20, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix, and for increasing consistency in the codebase.
mguaypaq
deleted the
jn/2770-fix-tqdm-behavior-on-more-obscure-platforms
branch
April 20, 2023 22:24
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
category: improves performance/results of an existing feature
SCT API: utils.py
context:
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.
Description
In many of our calls to
sct_progress_bar
(a light wrapper for tqdm), we currently forceascii=False
, which turns on unicode characters even on terminals that don't support them. This can lead to some buggy-looking output in certain cases:This PR removes the
ascii
setting from the various calls, then adds alternate defaultascii
behavior tosct_progress_bar
, following the recommendations from #2770 (comment):Linked issues
Fixes #2770.