Skip to content

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

Open
cceyda wants to merge 4 commits intoTextualize:masterfrom
cceyda:fix/progress_empty_line
Open

[Fix] : empty line printing after Progress on notebooks (vscode)#3562
cceyda wants to merge 4 commits intoTextualize:masterfrom
cceyda:fix/progress_empty_line

Conversation

@cceyda
Copy link
Copy Markdown
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
Copy Markdown

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 97.87%. Comparing base (efe8f61) to head (71409ae).
⚠️ Report is 1 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   97.87%   97.87%           
=======================================
  Files          96       96           
  Lines        8370     8370           
=======================================
  Hits         8192     8192           
  Misses        178      178           
Flag Coverage Δ
unittests 97.87% <ø> (ø)

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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