From ed0f5602e8fe05bb0ab3dcb98ec467811dc71724 Mon Sep 17 00:00:00 2001 From: Ceyda Cinarel <15624271+cceyda@users.noreply.github.com> Date: Fri, 15 Nov 2024 20:37:44 +0900 Subject: [PATCH 1/2] [Fix] : empty line printing on jupyter --- rich/console.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rich/console.py b/rich/console.py index 3ec9a8aab..a607d2d2f 100644 --- a/rich/console.py +++ b/rich/console.py @@ -2032,8 +2032,9 @@ def _write_buffer(self) -> None: if self.is_jupyter: # pragma: no cover from .jupyter import display - display(self._buffer, self._render_buffer(self._buffer[:])) - del self._buffer[:] + if self._buffer: + display(self._buffer, self._render_buffer(self._buffer[:])) + del self._buffer[:] else: if WINDOWS: use_legacy_windows_render = False From 4dbb84c95c05c62357200d6b25b5144f9fff1df8 Mon Sep 17 00:00:00 2001 From: Ceyda Cinarel <15624271+cceyda@users.noreply.github.com> Date: Fri, 15 Nov 2024 21:29:17 +0900 Subject: [PATCH 2/2] [doc] : add to changelog --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c7332fee..f25651c4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased -## [13.9.4] - 2024-11-01 +### Fixed + +- Fixed empty line being printed after Progress context is exited on notebooks(vscode) https://github.com/Textualize/rich/pull/3562 ### Changed