This commit is contained in:
Will McGugan 2020-07-13 10:18:05 +01:00
parent f84d5dee6a
commit 974cb77d45
3 changed files with 23 additions and 3 deletions

View File

@ -5,6 +5,12 @@ 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).
## [3.4.0] - Unreleased
### Added
- box.ASCII_DOUBLE_HEAD
## [3.3.0] - 2020-07-12
### Added

View File

@ -174,6 +174,19 @@ ASCII2: Box = Box(
"""
)
ASCII_DOUBLE_HEAD: Box = Box(
"""\
+-++
| ||
+=++
| ||
+-++
+-++
| ||
+-++
"""
)
SQUARE: Box = Box(
"""\
@ -412,6 +425,7 @@ if __name__ == "__main__": # pragma: no cover
BOXES = [
"ASCII",
"ASCII2",
"ASCII_DOUBLE_HEAD",
"SQUARE",
"MINIMAL",
"MINIMAL_HEAVY_HEAD",

View File

@ -294,7 +294,7 @@ class Table(JupyterMixin):
style (Union[str, Style], optional): Style for the column cells. Defaults to "none".
justify (JustifyMethod, optional): Alignment for cells. Defaults to "left".
width (int, optional): A minimum width in characters. Defaults to None.
ratio (int, optional): Flexible ratio for the column. Defaults to None.
ratio (int, optional): Flexible ratio for the column (requires ``Table.expand`` or ``Table.width``). Defaults to None.
no_wrap (bool, optional): Set to ``True`` to disable wrapping of this column.
"""
@ -652,13 +652,13 @@ class Table(JupyterMixin):
cells.append(lines)
cells[:] = [
Segment.set_shape(_cell, width, max_height, style=table_style)
_Segment.set_shape(_cell, width, max_height, style=table_style)
for width, _cell in zip(widths, cells)
]
if _box:
if last and show_footer:
yield Segment(
yield _Segment(
_box.get_row(widths, "foot", edge=show_edge), border_style
)
yield new_line