This commit is contained in:
Will McGugan 2020-07-03 17:25:32 +01:00
parent 181973311b
commit 8521c21ea5
2 changed files with 3 additions and 2 deletions

View File

@ -74,7 +74,8 @@ class Panel(JupyterMixin):
width = child_width + 2 width = child_width + 2
child_options = options.update(width=child_width) child_options = options.update(width=child_width)
lines = console.render_lines(renderable, child_options) lines = console.render_lines(renderable, child_options)
safe_box = self.safe_box if self.safe_box is not None else console.safe_box safe_box: bool = console.safe_box if self.safe_box is None else self.safe_box # type:ignore
box = get_safe_box(self.box, console.legacy_windows) if safe_box else self.box box = get_safe_box(self.box, console.legacy_windows) if safe_box else self.box
line_start = Segment(box.mid_left, style) line_start = Segment(box.mid_left, style)
line_end = Segment(f"{box.mid_right}\n", style) line_end = Segment(f"{box.mid_right}\n", style)

View File

@ -578,7 +578,7 @@ class Table(JupyterMixin):
) )
) )
) )
safe_box = self.safe_box if self.safe_box is not None else console.safe_box safe_box: bool = console.safe_box if self.safe_box is None else self.safe_box # type: ignore
_box = ( _box = (
box.get_safe_box(self.box, console.legacy_windows) if safe_box else self.box box.get_safe_box(self.box, console.legacy_windows) if safe_box else self.box
) )