|
| int | span (self) |
| |
| "Measurement" | normalize (self) |
| |
| "Measurement" | with_maximum (self, int width) |
| |
| "Measurement" | with_minimum (self, int width) |
| |
| "Measurement" | clamp (self, Optional[int] min_width=None, Optional[int] max_width=None) |
| |
| "Measurement" | get (cls, "Console" console, "ConsoleOptions" options, "RenderableType" renderable) |
| |
Stores the minimum and maximum widths (in characters) required to render an object.
◆ clamp()
| "Measurement" pip._vendor.rich.measure.Measurement.clamp |
( |
|
self, |
|
|
Optional[int] |
min_width = None, |
|
|
Optional[int] |
max_width = None |
|
) |
| |
Clamp a measurement within the specified range.
Args:
min_width (int): Minimum desired width, or ``None`` for no minimum. Defaults to None.
max_width (int): Maximum desired width, or ``None`` for no maximum. Defaults to None.
Returns:
Measurement: New Measurement object.
◆ get()
| "Measurement" pip._vendor.rich.measure.Measurement.get |
( |
|
cls, |
|
|
"Console" |
console, |
|
|
"ConsoleOptions" |
options, |
|
|
"RenderableType"
|
renderable |
|
) |
| |
Get a measurement for a renderable.
Args:
console (~rich.console.Console): Console instance.
options (~rich.console.ConsoleOptions): Console options.
renderable (RenderableType): An object that may be rendered with Rich.
Raises:
errors.NotRenderableError: If the object is not renderable.
Returns:
Measurement: Measurement object containing range of character widths required to render the object.
◆ normalize()
| "Measurement" pip._vendor.rich.measure.Measurement.normalize |
( |
|
self | ) |
|
Get measurement that ensures that minimum <= maximum and minimum >= 0
Returns:
Measurement: A normalized measurement.
◆ span()
| int pip._vendor.rich.measure.Measurement.span |
( |
|
self | ) |
|
Get difference between maximum and minimum.
◆ with_maximum()
| "Measurement" pip._vendor.rich.measure.Measurement.with_maximum |
( |
|
self, |
|
|
int |
width |
|
) |
| |
Get a RenderableWith where the widths are <= width.
Args:
width (int): Maximum desired width.
Returns:
Measurement: New Measurement object.
◆ with_minimum()
| "Measurement" pip._vendor.rich.measure.Measurement.with_minimum |
( |
|
self, |
|
|
int |
width |
|
) |
| |
Get a RenderableWith where the widths are >= width.
Args:
width (int): Minimum desired width.
Returns:
Measurement: New Measurement object.
The documentation for this class was generated from the following file:
- docs/help/help-venv/lib/python3.12/site-packages/pip/_vendor/rich/measure.py