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

Method __rich_measure__

rich/padding.py:125–135  ·  view source on GitHub ↗
(
        self, console: "Console", options: "ConsoleOptions"
    )

Source from the content-addressed store, hash-verified

123 yield from blank_line * self.bottom
124
125 def __rich_measure__(
126 self, console: "Console", options: "ConsoleOptions"
127 ) -> "Measurement":
128 max_width = options.max_width
129 extra_width = self.left + self.right
130 if max_width - extra_width < 1:
131 return Measurement(max_width, max_width)
132 measure_min, measure_max = Measurement.get(console, options, self.renderable)
133 measurement = Measurement(measure_min + extra_width, measure_max + extra_width)
134 measurement = measurement.with_maximum(max_width)
135 return measurement
136
137
138if __name__ == "__main__": # pragma: no cover

Callers

nothing calls this directly

Calls 3

with_maximumMethod · 0.95
MeasurementClass · 0.85
getMethod · 0.45

Tested by

no test coverage detected