| 249 | self._current_section.indent_level = indent_level |
| 250 | |
| 251 | def render(self, stream): |
| 252 | max_width = self._calculate_max_width() |
| 253 | should_convert_table = self._determine_conversion_needed(max_width) |
| 254 | if should_convert_table: |
| 255 | convert_to_vertical_table(self._sections) |
| 256 | max_width = self._calculate_max_width() |
| 257 | stream.write('-' * max_width + '\n') |
| 258 | for section in self._sections: |
| 259 | self._render_section(section, max_width, stream) |
| 260 | |
| 261 | def _determine_conversion_needed(self, max_width): |
| 262 | # If we don't know the width of the controlling terminal, |