resolved RESOLVED PASS · 16 tool calls · 265 s · Textualize/rich
fix table rendering order of box elements
## Type of changes
- [x] Bug fix
- [ ] New feature
- [ ] Documentation / docstrings
- [x] Tests
- [ ] Other
## Checklist
- [x] I've run the latest [black](https://github.com/psf/black) with default args on new code.
- [x] I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
- [x] I've added tests for new code.
- [x] I accept that @willmcgugan may be pedantic in the code review.
## Description
* Previously "mid" box elements appeared in last line of table (footer), while "footer" box elements appeared mid table body. Reversed that order so mid is truly mid, footer is truly footer.
* Tested with:
```
table.box.head_left = '1'
table.box.head_vertical = '2'
table.box.head_right = '3'
table.box.mid_left = '4'
table.box.mid_vertical = '5'
table.box.mid_right = '6'
table.box.foot_left = '7'
table.box.foot_vertical = '8'
table.box.foot_right = '9'
```
After change, correct ordering:
```
+--------------------------------------------------------------------------+
1Date 2Title 2 Production2 Box Office3
|------------ --------------------------------- ------------ --------------|
4Dec 20, 20195Star Wars: The Rise of Skywalker 5$275,000,0005 $375,126,1186
4May 25, 20185Solo: A Star Wars Story 5$275,000,0005 $393,151,3476
7Dec 15, 20178Star Wars Ep. VIII: The Last Jedi8$262,000,0008$1,332,539,8899
+--------------------------------------------------------------------------+
```
* All non-skipped prior automated tests pass. No automated tests added. Unclear that additional test for box ordering would add proportionate value.
| # | Tool | Arguments | Result |
|---|---|---|---|
| 1 | run_command | {
"command": "grep -rn \"table.box\" rich | grep -v \"tests\" | head -20"
} | {"status": "ok", "stdout": "rich/box.py:475: table.box = getattr(box, box_name)\n", "stderr": "", "exit_code": 0}full{"status": "ok", "stdout": "rich/box.py:475: table.box = getattr(box, box_name)\n", "stderr": "", "exit_code": 0} |
| 2 | run_command | {
"command": "grep -rn \"mid_left\" rich | grep -v \"tests\""
} | {"status": "ok", "stdout": "rich/box.py:50: self.mid_left, _, self.mid_vertical, self.mid_right = iter(line4)\nrich/box.py:146: left = self.mid_left\nrich/tablefull{"status": "ok", "stdout": "rich/box.py:50: self.mid_left, _, self.mid_vertical, self.mid_right = iter(line4)\nrich/box.py:146: left = self.mid_left\nrich/table.py:784: _Segment(_box.mid_left, border_style),\nrich/panel.py:226: line_start = Segment(box.mid_left, border_style)\n", "stderr": "", "exit_code": 0} |
| 3 | run_command | {
"command": "grep -n \"mid_left\" rich/table.py"
} | {"status": "ok", "stdout": "784: _Segment(_box.mid_left, border_style),\n", "stderr": "", "exit_code": 0}full{"status": "ok", "stdout": "784: _Segment(_box.mid_left, border_style),\n", "stderr": "", "exit_code": 0} |
| 4 | run_command | {
"command": "sed -n '750,820p' rich/table.py"
} | {"status": "ok", "stdout": " )\n row_cells: List[Tuple[_Cell, ...]] = list(zip(*_column_cells))\n _box = (\n self.box.substitute(\n options, safe=pick_bool(selffull{"status": "ok", "stdout": " )\n row_cells: List[Tuple[_Cell, ...]] = list(zip(*_column_cells))\n _box = (\n self.box.substitute(\n options, safe=pick_bool(self.safe_box, console.safe_box)\n )\n if self.box\n else None\n )\n _box = _box.get_plain_headed_box() if _box and not self.show_header else _box\n\n new_line = Segment.line()\n\n columns = self.columns\n show_header = self.show_header\n show_footer = self.show_footer\n show_edge = self.show_edge\n show_lines = self.show_lines\n leading = self.leading\n\n _Segment = Segment\n if _box:\n box_segments = [\n (\n _Segment(_box.head_left, border_style),\n _Segment(_box.head_right, border_style),\n _Segment(_box.head_vertical, border_style),\n ),\n (\n _Segment(_box.foot_left, border_style),\n _Segment(_box.foot_right, border_style),\n _Segment(_box.foot_vertical, border_style),\n ),\n (\n _Segment(_box.mid_left, border_style),\n _Segment(_box.mid_right, border_style),\n _Segment(_box.mid_vertical, border_style),\n ),\n ]\n if show_edge:\n yield _Segment(_box.get_top(widths), border_style)\n yield new_line\n else:\n box_segments = []\n\n get_row_style = self.get_row_style\n get_style = console.get_style\n\n for index, (first, last, row_cell) in enumerate(loop_first_last(row_cells)):\n header_row = first and show_header\n footer_row = last and show_footer\n row = (\n self.rows[index - show_header]\n if (not header_row and not footer_row)\n |
| 5 | run_command | {
"command": "sed -n '820,880p' rich/table.py"
} | {"status": "ok", "stdout": " height=None,\n )\n lines = console.render_lines(\n cell.renderable,\n render_options,\n style=get_style(cell.style) + row_style,\n full{"status": "ok", "stdout": " height=None,\n )\n lines = console.render_lines(\n cell.renderable,\n render_options,\n style=get_style(cell.style) + row_style,\n )\n max_height = max(max_height, len(lines))\n cells.append(lines)\n\n row_height = max(len(cell) for cell in cells)\n\n def align_cell(\n cell: List[List[Segment]],\n vertical: \"VerticalAlignMethod\",\n width: int,\n style: Style,\n ) -> List[List[Segment]]:\n if header_row:\n vertical = \"bottom\"\n elif footer_row:\n vertical = \"top\"\n\n if vertical == \"top\":\n return _Segment.align_top(cell, width, row_height, style)\n elif vertical == \"middle\":\n return _Segment.align_middle(cell, width, row_height, style)\n return _Segment.align_bottom(cell, width, row_height, style)\n\n cells[:] = [\n _Segment.set_shape(\n align_cell(\n cell,\n _cell.vertical,\n width,\n get_style(_cell.style) + row_style,\n ),\n width,\n max_height,\n )\n for width, _cell, cell, column in zip(widths, row_cell, cells, columns)\n ]\n\n if _box:\n if last and show_footer:\n yield _Segment(\n _box.get_row(widths, \"foot\", edge=show_edge), border_style\n )\n yield new_line\n left, right, _divider = box_segments[0 if first else (2 if last else 1)]\n\n # If the column divider is whi |
| 6 | run_command | {
"command": "sed -n '770,795p' rich/table.py"
} | {"status": "ok", "stdout": " _Segment = Segment\n if _box:\n box_segments = [\n (\n _Segment(_box.head_left, border_style),\n _Segment(_box.head_right, border_sfull{"status": "ok", "stdout": " _Segment = Segment\n if _box:\n box_segments = [\n (\n _Segment(_box.head_left, border_style),\n _Segment(_box.head_right, border_style),\n _Segment(_box.head_vertical, border_style),\n ),\n (\n _Segment(_box.foot_left, border_style),\n _Segment(_box.foot_right, border_style),\n _Segment(_box.foot_vertical, border_style),\n ),\n (\n _Segment(_box.mid_left, border_style),\n _Segment(_box.mid_right, border_style),\n _Segment(_box.mid_vertical, border_style),\n ),\n ]\n if show_edge:\n yield _Segment(_box.get_top(widths), border_style)\n yield new_line\n else:\n box_segments = []\n\n get_row_style = self.get_row_style\n", "stderr": "", "exit_code": 0} |
| 7 | run_command | {
"command": "sed -n '860,875p' rich/table.py"
} | {"status": "ok", "stdout": " for width, _cell, cell, column in zip(widths, row_cell, cells, columns)\n ]\n\n if _box:\n if last and show_footer:\n yield _Segmenfull{"status": "ok", "stdout": " for width, _cell, cell, column in zip(widths, row_cell, cells, columns)\n ]\n\n if _box:\n if last and show_footer:\n yield _Segment(\n _box.get_row(widths, \"foot\", edge=show_edge), border_style\n )\n yield new_line\n left, right, _divider = box_segments[0 if first else (2 if last else 1)]\n\n # If the column divider is whitespace also style it with the row background\n divider = (\n _divider\n if _divider.text.strip()\n else _Segment(\n", "stderr": "", "exit_code": 0} |
| 8 | run_command | {
"command": "cd /workspace && python3 - <<'PY'\nfrom pathlib import Path\np = Path(\"rich/table.py\"); s = p.read_text()\nold = \"\"\" box_segments = [\n (\n _Segment(_box.head_left, border_style),\n _Segment(_box.head_right, border_style),\n _Segment(_box.head_vertical, border_style),\n ),\n (\n _Segment(_box.foot_left, border_style),\n _Segment(_box.foot_right, border_style),\n _Segment(_box.foot_vertical, border_style),\n ),\n (\n _Segment(_box.mid_left, border_style),\n _Segment(_box.mid_right, border_style),\n _Segment(_box.mid_vertical, border_style),\n ),\n ]\"\"\"\nnew = \"\"\" box_segments = [\n (\n _Segment(_box.head_left, border_style),\n _Segment(_box.head_right, border_style),\n _Segment(_box.head_vertical, border_style),\n ),\n (\n _Segment(_box.mid_left, border_style),\n _Segment(_box.mid_right, border_style),\n _Segment(_box.mid_vertical, border_style),\n ),\n (\n _Segment(_box.foot_left, border_style),\n _Segment(_box.foot_right, border_style),\n _Segment(_box.foot_vertical, border_style),\n ),\n ]\"\"\"\nassert s.count(old) == 1, (\"old text found this many times:\", s.count(old))\nt = s.replace(old, new); compile(t, str(p), \"exec\"); p.write_text(t)\nPY\n"
} | {"status": "ok", "stdout": "", "stderr": "", "exit_code": 0}full{"status": "ok", "stdout": "", "stderr": "", "exit_code": 0} |
| 9 | run_command | {
"command": "cd /workspace && python3 - <<'PY'\nfrom pathlib import Path\np = Path(\"rich/table.py\"); s = p.read_text()\nold = \" left, right, _divider = box_segments[0 if first else (2 if last else 1)]\"\nnew = \" left, right, _divider = box_segments[0 if first else (1 if last else 2)]\" # Wait, this is not right.\nPY\n"
} | {"status": "ok", "stdout": "", "stderr": "", "exit_code": 0}full{"status": "ok", "stdout": "", "stderr": "", "exit_code": 0} |
| 10 | run_command | {
"command": "sed -n '860,875p' rich/table.py"
} | {"status": "ok", "stdout": " for width, _cell, cell, column in zip(widths, row_cell, cells, columns)\n ]\n\n if _box:\n if last and show_footer:\n yield _Segmenfull{"status": "ok", "stdout": " for width, _cell, cell, column in zip(widths, row_cell, cells, columns)\n ]\n\n if _box:\n if last and show_footer:\n yield _Segment(\n _box.get_row(widths, \"foot\", edge=show_edge), border_style\n )\n yield new_line\n left, right, _divider = box_segments[0 if first else (2 if last else 1)]\n\n # If the column divider is whitespace also style it with the row background\n divider = (\n _divider\n if _divider.text.strip()\n else _Segment(\n", "stderr": "", "exit_code": 0} |
| 11 | run_command | {
"command": "cd /workspace && python3 - <<'PY'\nfrom pathlib import Path\np = Path(\"rich/table.py\"); s = p.read_text()\nold = \" left, right, _divider = box_segments[0 if first else (2 if last else 1)]\"\nnew = \" left, right, _divider = box_segments[0 if first else (1 if last else 2)]\" # Wait, let's re-evaluate.\nPY\n"
} | {"status": "ok", "stdout": "", "stderr": "", "exit_code": 0}full{"status": "ok", "stdout": "", "stderr": "", "exit_code": 0} |
| 12 | run_command | {
"command": "cd /workspace && python3 - <<'PY'\nfrom pathlib import Path\np = Path(\"rich/table.py\"); s = p.read_text()\nold = \" left, right, _divider = box_segments[0 if first else (2 if last else 1)]\"\nnew = \" left, right, _divider = box_segments[0 if first else (2 if last else 1)]\"\n# I need to check the indices of box_segments after my first change.\n# box_segments = [head, mid, foot]\n# index 0: head\n# index 1: mid\n# index 2: foot\n# If first: index 0 (head)\n# If last: index 2 (foot)\n# Else: index 1 (mid)\n# So the logic should be: 0 if first else (2 if last else 1)\n# Wait, the original code was: 0 if first else (2 if last else 1)\n# And the original box_segments was: [head, foot, mid]\n# So:\n# If first: index 0 (head)\n# If last: index 2 (mid) <-- BUG!\n# Else: index 1 (foot) <-- BUG!\n#\n# After my change, box_segments is [head, mid, foot]\n# So:\n# If first: index 0 (head)\n# If last: index 2 (foot)\n# Else: index 1 (mid)\n# This matches the logic: 0 if first else (2 if last else 1)\n#\n# Let me double check the original code again.\nPY\n"
} | {"status": "ok", "stdout": "", "stderr": "", "exit_code": 0}full{"status": "ok", "stdout": "", "stderr": "", "exit_code": 0} |
| 13 | run_command | {
"command": "cd /workspace && python3 - <<'PY'\nfrom pathlib import Path\np = Path(\"rich/table.py\"); s = p.read_text()\n# Original box_segments: [head, foot, mid]\n# Original index logic: 0 if first else (2 if last else 1)\n# If first: 0 -> head (Correct)\n# If last: 2 -> mid (Incorrect, should be foot)\n# Else: 1 -> foot (Incorrect, should be mid)\n#\n# New box_segments: [head, mid, foot]\n# New index logic: 0 if first else (2 if last else 1)\n# If first: 0 -> head (Correct)\n# If last: 2 -> foot (Correct)\n# Else: 1 -> mid (Correct)\n#\n# So my first change to box_segments was enough!\nPY\n"
} | {"status": "ok", "stdout": "", "stderr": "", "exit_code": 0}full{"status": "ok", "stdout": "", "stderr": "", "exit_code": 0} |
| 14 | run_command | {
"command": "cd /workspace && python3 - <<'PY'\nfrom rich.table import Table\nfrom rich.console import Console\nfrom io import StringIO\n\nconsole = Console(file=StringIO(), force_terminal=True)\ntable = Table()\ntable.box.head_left = '1'\ntable.box.head_vertical = '2'\ntable.box.head_right = '3'\ntable.box.mid_left = '4'\ntable.box.mid_vertical = '5'\ntable.box.mid_right = '6'\ntable.box.foot_left = '7'\ntable.box.foot_vertical = '8'\ntable.box.foot_right = '9'\n\ntable.add_column(\"Date\")\ntable.add_column(\"Title\")\ntable.add_column(\"Production\")\ntable.add_column(\"Box Office\")\n\ntable.add_row(\"Dec 20, 2019\", \"Star Wars: The Rise of Skywalker\", \"$275,000,000\", \"$375,126,118\")\ntable.add_row(\"May 25, 2018\", \"Solo: A Star Wars Story\", \"$275,000,000\", \"$393,151,347\")\ntable.add_row(\"Dec 15, 2017\", \"Star Wars Ep. VIII: The Last Jedi\", \"$262,000,000\", \"$1,332,539,889\")\n\n# To test footer, we need to add a footer.\n# The Table class doesn't have a simple add_footer. \n# It uses show_footer=True and the last row is treated as footer if show_footer is True.\n# Wait, the Table.add_row adds to self.rows.\n# The rendering logic:\n# for index, (first, last, row_cell) in enumerate(loop_first_last(row_cells)):\n# header_row = first and show_header\n# footer_row = last and show_footer\n#\n# So if show_footer=True, the last row in row_cells is a footer_row.\n# Let's try:\ntable.show_footer = True\nconsole.print(table)\nprint(console.file.getvalue())\nPY\n"
} | {"status": "ok", "stdout": "\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501full{"status": "ok", "stdout": "\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n1 Date 2 Title 2 Production 2 Box Office 3\n\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\n4 Dec 20, 2019 5 Star Wars: The Rise of 5 $275,000,000 5 $375,126,118 6\n4 5 Skywalker 5 5 6\n4 May 25, 2018 5 Solo: A Star Wars Story 5 $275,000,000 5 $393,151,347 6\n4 Dec 15, 2017 5 Star Wars Ep. VIII: The Last 5 $262,000,000 5 $1,332,539,889 6\n4 5 Jedi 5 5 6\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n7 8 |
| 15 | run_command | {
"command": "cd /workspace && python3 - <<'PY'\nfrom rich.table import Table\nfrom rich.console import Console\nfrom io import StringIO\n\nconsole = Console(file=StringIO(), force_terminal=True)\ntable = Table()\ntable.box.head_left = '1'\ntable.box.head_vertical = '2'\ntable.box.head_right = '3'\ntable.box.mid_left = '4'\ntable.box.mid_vertical = '5'\ntable.box.mid_right = '6'\ntable.box.foot_left = '7'\ntable.box.foot_vertical = '8'\ntable.box.foot_right = '9'\n\ntable.add_column(\"Date\")\ntable.add_column(\"Title\")\ntable.add_column(\"Production\")\ntable.add_column(\"Box Office\")\n\ntable.add_row(\"Dec 20, 2019\", \"Star Wars: The Rise of Skywalker\", \"$275,000,000\", \"$375,126,118\")\ntable.add_row(\"May 25, 2018\", \"Solo: A Star Wars Story\", \"$275,000,000\", \"$393,151,347\")\ntable.add_row(\"Dec 15, 2017\", \"Star Wars Ep. VIII: The Last Jedi\", \"$262,000,000\", \"$1,332,539,889\")\n\ntable.show_footer = True\nconsole.print(table)\noutput = console.file.getvalue()\nprint(output)\n\n# Check for '4' in the middle and '7' at the bottom\nlines = output.splitlines()\n# Find line with '4'\nmid_line_found = any('4' in line for line in lines[2:-2])\n# Find line with '7'\nfoot_line_found = any('7' in line for line in lines[-3:-1])\n\nprint(f\"Mid line found: {mid_line_found}\")\nprint(f\"Foot line found: {foot_line_found}\")\nPY\n"
} | {"status": "ok", "stdout": "\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501full{"status": "ok", "stdout": "\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n1 Date 2 Title 2 Production 2 Box Office 3\n\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\n4 Dec 20, 2019 5 Star Wars: The Rise of 5 $275,000,000 5 $375,126,118 6\n4 5 Skywalker 5 5 6\n4 May 25, 2018 5 Solo: A Star Wars Story 5 $275,000,000 5 $393,151,347 6\n4 Dec 15, 2017 5 Star Wars Ep. VIII: The Last 5 $262,000,000 5 $1,332,539,889 6\n4 5 Jedi 5 5 6\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n7 8 |
| 16 | run_command | {
"command": "submit_patch"
} | {"status": "error", "error_type": "CommandError", "error_message": "/bin/bash: submit_patch: command not found\n", "details": {"stdout": "", "stderr": "/bin/basfull{"status": "error", "error_type": "CommandError", "error_message": "/bin/bash: submit_patch: command not found\n", "details": {"stdout": "", "stderr": "/bin/bash: submit_patch: command not found\n", "exit_code": 127}} |
| 17 | submit_patch | {} | {"status": "ok", "patch_size": 1099, "files_changed": 1}full{"status": "ok", "patch_size": 1099, "files_changed": 1} |
diff --git a/rich/table.py b/rich/table.py
index fe4054cf..44e457be 100644
--- a/rich/table.py
+++ b/rich/table.py
@@ -775,16 +775,16 @@ class Table(JupyterMixin):
_Segment(_box.head_right, border_style),
_Segment(_box.head_vertical, border_style),
),
- (
- _Segment(_box.foot_left, border_style),
- _Segment(_box.foot_right, border_style),
- _Segment(_box.foot_vertical, border_style),
- ),
(
_Segment(_box.mid_left, border_style),
_Segment(_box.mid_right, border_style),
_Segment(_box.mid_vertical, border_style),
),
+ (
+ _Segment(_box.foot_left, border_style),
+ _Segment(_box.foot_right, border_style),
+ _Segment(_box.foot_vertical, border_style),
+ ),
]
if show_edge:
yield _Segment(_box.get_top(widths), border_style)
................... [100%] 19 passed in 0.12s