MCPcopy
hub / github.com/Textualize/rich / __rich_console__

Method __rich_console__

rich/constrain.py:22–29  ·  view source on GitHub ↗
(
        self, console: "Console", options: "ConsoleOptions"
    )

Source from the content-addressed store, hash-verified

20 self.width = width
21
22 def __rich_console__(
23 self, console: "Console", options: "ConsoleOptions"
24 ) -> "RenderResult":
25 if self.width is None:
26 yield self.renderable
27 else:
28 child_options = options.update_width(min(self.width, options.max_width))
29 yield from console.render(self.renderable, child_options)
30
31 def __rich_measure__(
32 self, console: "Console", options: "ConsoleOptions"

Callers

nothing calls this directly

Calls 2

update_widthMethod · 0.80
renderMethod · 0.45

Tested by

no test coverage detected