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

[Fix] : empty line printing after Progress on notebooks (vscode) #3562

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cceyda
Copy link
Contributor

@cceyda cceyda commented Nov 15, 2024

Type of changes

  • Bug fix
  • New feature
  • Documentation / docstrings
  • Tests
  • Other

Checklist

  • I've run the latest black with default args on new code.
  • I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
  • I've added tests for new code.
  • I accept that @willmcgugan may be pedantic in the code review.

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:
image

After:
image

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

def display(segments: Iterable[Segment], text: str) -> None:
level

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.

@codecov-commenter
Copy link

codecov-commenter commented Nov 15, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.25%. Comparing base (02f3d14) to head (4dbb84c).
Report is 3 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3562   +/-   ##
=======================================
  Coverage   98.25%   98.25%           
=======================================
  Files          74       74           
  Lines        8095     8095           
=======================================
  Hits         7954     7954           
  Misses        141      141           
Flag Coverage Δ
unittests 98.25% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants