Method: rich.text.Text.__rich_console__
Calls: 1118, Exceptions: 1, Paths: 1Back
Path 1: 1118 calls (1.0)
Console (1118)
ConsoleOptions (1118)
Segment (5523) None (1118)
GeneratorExit (1)
1def __rich_console__(
2 self, console: "Console", options: "ConsoleOptions"
3 ) -> Iterable[Segment]:
4 tab_size: int = console.tab_size or self.tab_size or 8
5 justify = self.justify or options.justify or DEFAULT_JUSTIFY
6
7 overflow = self.overflow or options.overflow or DEFAULT_OVERFLOW
8
9 lines = self.wrap(
10 console,
11 options.max_width,
12 justify=justify,
13 overflow=overflow,
14 tab_size=tab_size or 8,
15 no_wrap=pick_bool(self.no_wrap, options.no_wrap, False),
16 )
17 all_lines = Text("\n").join(lines)
18 yield from all_lines.render(console, end=self.end)