Method: rich.layout.Layout.__rich_console__
Calls: 3, Exceptions: 1, Paths: 1Back
Path 1: 3 calls (1.0)
Console (3)
ConsoleOptions (3)
Segment (146) None (1)
GeneratorExit (1)
1def __rich_console__(
2 self, console: Console, options: ConsoleOptions
3 ) -> RenderResult:
4 with self._lock:
5 width = options.max_width or console.width
6 height = options.height or console.height
7 render_map = self.render(console, options.update_dimensions(width, height))
8 self._render_map = render_map
9 layout_lines: List[List[Segment]] = [[] for _ in range(height)]
10 _islice = islice
11 for (region, lines) in render_map.values():
12 _x, y, _layout_width, layout_height = region
13 for row, line in zip(
14 _islice(layout_lines, y, y + layout_height), lines
15 ):
16 row.extend(line)
17
18 new_line = Segment.line()
19 for layout_row in layout_lines:
20 yield from layout_row
21 yield new_line