(
self,
terminal_width=None,
initial_section=True,
column_separator='|',
terminal=None,
styler=None,
auto_reformat=True,
)
| 205 | |
| 206 | class MultiTable: |
| 207 | def __init__( |
| 208 | self, |
| 209 | terminal_width=None, |
| 210 | initial_section=True, |
| 211 | column_separator='|', |
| 212 | terminal=None, |
| 213 | styler=None, |
| 214 | auto_reformat=True, |
| 215 | ): |
| 216 | self._auto_reformat = auto_reformat |
| 217 | if initial_section: |
| 218 | self._current_section = Section() |
| 219 | self._sections = [self._current_section] |
| 220 | else: |
| 221 | self._current_section = None |
| 222 | self._sections = [] |
| 223 | if styler is None: |
| 224 | # Move out to factory. |
| 225 | if is_a_tty(): |
| 226 | self._styler = ColorizedStyler() |
| 227 | else: |
| 228 | self._styler = Styler() |
| 229 | else: |
| 230 | self._styler = styler |
| 231 | self._rendering_index = 0 |
| 232 | self._column_separator = column_separator |
| 233 | if terminal_width is None: |
| 234 | self._terminal_width = determine_terminal_width() |
| 235 | |
| 236 | def add_title(self, title): |
| 237 | self._current_section.add_title(title) |
nothing calls this directly
no test coverage detected