Method: rich.constrain.Constrain.__rich_console__
Calls: 45, Exceptions: 0, Paths: 2Back
Path 1: 40 calls (0.89)
Console (40)
ConsoleOptions (40)
Segment (2472) None (40)
1def __rich_console__(
2 self, console: "Console", options: "ConsoleOptions"
3 ) -> "RenderResult":
4 if self.width is None:
5 yield self.renderable
6 else:
7 child_options = options.update_width(min(self.width, options.max_width))
8 yield from console.render(self.renderable, child_options)
Path 2: 5 calls (0.11)
Console (5)
ConsoleOptions (5)
Panel (5) None (5)
1def __rich_console__(
2 self, console: "Console", options: "ConsoleOptions"
3 ) -> "RenderResult":
4 if self.width is None:
5 yield self.renderable
6 else:
7 child_options = options.update_width(min(self.width, options.max_width))
8 yield from console.render(self.renderable, child_options)