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: Add display() call to close() in rich module #1395
Conversation
tqdm/rich.py
Outdated
|
||
# Add call display to print 100% | ||
# https://github.com/tqdm/tqdm/issues/1306#issuecomment-1322762835 | ||
self.display() |
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.
self.display() | |
if self.leave: | |
self.display() |
should it be with self.leave
check like gui.py
?
Lines 104 to 105 in 6791e8c
if self.leave: self.display()
@casperdcl do you need some help maintaining this project? |
Codecov Report
@@ Coverage Diff @@
## master #1395 +/- ##
=======================================
Coverage 88.94% 88.94%
=======================================
Files 26 26
Lines 1764 1764
Branches 344 344
=======================================
Hits 1569 1569
Misses 145 145
Partials 50 50 |
Monkey patching in my project: |
@casperdcl my monkey patching no issues so far: |
a4eaa99
to
fe68772
Compare
I know this PR is a bit old, but I was having the issue as well and decided to check if there was any fix. This PR actually didn't fix it for me, at least not completely. The
Mind the The default (https://github.com/Textualize/rich/blob/master/rich/progress.py#L1421) is set to |
it has been rebased to the last release: v4.66.1, so not old. |
🚧 Never link to branches, share a permalink 🚧
NOTE: edit your post and fix it with a permalink! |
@sybrenjansen what's your reproducer? perhaps it's something else (create new issue with it?), as this fixes for me and other users in #1306 |
argh sorry for the epic delay... will release in |
See how I've come to this conclusion. This note and notes before it:
Testcase:
This snippet, when run, must reach 100%. without the patch it doesn't even get past 0.
The
display()
calls in std.close are never reached because the "gui mode check" exits the function:tqdm/tqdm/std.py
Lines 1295 to 1297 in 6791e8c
Fixes: