fix empty line print on jupyter

This commit is contained in:
Ceyda Cinarel 2023-03-08 18:53:32 +09:00 committed by GitHub
parent 2eb5cbfd46
commit 680d9d876e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 1 deletions

View File

@ -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

View File

@ -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)

View File

@ -1162,7 +1162,7 @@ class Progress(JupyterMixin):
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":