[Fix] : empty line printing after Progress on notebooks (vscode) #3562
+7
−3
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.
Type of changes
Checklist
Description
In VsCode after Progress is finished and it is exiting the 'with' context it prints an empty line. (Only happens on vscode and not jupyterlab afaik)
Before:
After:
I debugged it to find that while exiting the context
_buffer
is just empty at the end causing this empty line being printed.Screen.Recording.2024-11-15.at.21.11.58.mov
Not sure if this should be maybe fixed at
rich/rich/jupyter.py
Line 84 in 43d3b04
May seem insignificant like just 1 empty line but if the progress context is entered multiple times(unavoidably) like in a loop etc it prints many empty lines! And I actually encountered this while trying to add progress bar functionality to another project where I had to call
with progress
context many times. And I remember this issue bothering me since forever and hope finally it is gone for good.