Get the top of a simple box. Args: widths (List[int]): Widths of columns. Returns: str: A string of box characters.
(self, widths: Iterable[int])
| 93 | return PLAIN_HEADED_SUBSTITUTIONS.get(self, self) |
| 94 | |
| 95 | def get_top(self, widths: Iterable[int]) -> str: |
| 96 | """Get the top of a simple box. |
| 97 | |
| 98 | Args: |
| 99 | widths (List[int]): Widths of columns. |
| 100 | |
| 101 | Returns: |
| 102 | str: A string of box characters. |
| 103 | """ |
| 104 | |
| 105 | parts: List[str] = [] |
| 106 | append = parts.append |
| 107 | append(self.top_left) |
| 108 | for last, width in loop_last(widths): |
| 109 | append(self.top * width) |
| 110 | if not last: |
| 111 | append(self.top_divider) |
| 112 | append(self.top_right) |
| 113 | return "".join(parts) |
| 114 | |
| 115 | def get_row( |
| 116 | self, |