From 680d9d876e561f1e1ad511fcfe5f5f793a40bc2f Mon Sep 17 00:00:00 2001 From: Ceyda Cinarel <15624271+cceyda@users.noreply.github.com> Date: Wed, 8 Mar 2023 18:53:32 +0900 Subject: [PATCH] fix empty line print on jupyter --- CHANGELOG.md | 3 +++ CONTRIBUTORS.md | 1 + rich/progress.py | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63d6f5e54..be46f3b74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ 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] + +- Removed the empty line printed in jupyter while using `Progress` https://github.com/Textualize/rich/pull/2616 ## [13.3.2] - 2023-02-04 diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 397fb8f09..69a2094cd 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -9,6 +9,7 @@ The following people have contributed to the development of Rich: - [Artur Borecki](https://github.com/pufereq) - [Dennis Brakhane](https://github.com/brakhane) - [Darren Burns](https://github.com/darrenburns) +- [Ceyda Cinarel](https://github.com/cceyda) - [Jim Crist-Harif](https://github.com/jcrist) - [Ed Davis](https://github.com/davised) - [Pete Davison](https://github.com/pd93) diff --git a/rich/progress.py b/rich/progress.py index 43c47eb98..2a20e7359 100644 --- a/rich/progress.py +++ b/rich/progress.py @@ -1162,7 +1162,7 @@ def start(self) -> None: def stop(self) -> None: """Stop the progress display.""" self.live.stop() - if not self.console.is_interactive: + if not self.console.is_interactive and not self.console.is_jupyter: self.console.print() def __enter__(self) -> "Progress":