Skip to content

Commit f2af8c9

Browse files
authored
Merge pull request #126 from willmcgugan/win-tables
fix for tables in Jupyter on Windows
2 parents 4020d5a + 0eb37a9 commit f2af8c9

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.3.1] - 2020-06-26
9+
10+
### Fixed
11+
12+
- Disabled legacy_windows if jupyter is detected
13+
814
## [2.3.0] - 2020-06-26
915

1016
### Fixed

examples/table.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"""
44

55
from rich.console import Console
6-
from rich.measure import Measurement
76
from rich.table import Table
87

98
table = Table(title="Star Wars Movies")

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "rich"
33
homepage = "https://github.com/willmcgugan/rich"
44
documentation = "https://rich.readthedocs.io/en/latest/"
5-
version = "2.3.0"
5+
version = "2.3.1"
66
description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal"
77
authors = ["Will McGugan <willmcgugan@gmail.com>"]
88
license = "MIT"

rich/console.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,9 @@ def __init__(
315315
self._emoji = emoji
316316
self._highlight = highlight
317317
self.legacy_windows: bool = (
318-
detect_legacy_windows() if legacy_windows is None else legacy_windows
318+
(detect_legacy_windows() and not self.is_jupyter)
319+
if legacy_windows is None
320+
else legacy_windows
319321
)
320322

321323
self._color_system: Optional[ColorSystem]

rich/table.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ def _render(
552552
_Segment(_box.head_vertical, border_style),
553553
),
554554
(
555-
Segment(_box.foot_left, border_style),
555+
_Segment(_box.foot_left, border_style),
556556
_Segment(_box.foot_right, border_style),
557557
_Segment(_box.foot_vertical, border_style),
558558
),

0 commit comments

Comments
 (0)