Method: rich.measure.Measurement.with_maximum
Calls: 4238, Exceptions: 0, Paths: 1Back
Path 1: 4238 calls (1.0)
17 (432) 48 (312) 60 (259) 140 (255) 80 (237) 86 (172) 55 (168) 56 (157) 57 (156) 44 (148)
Measurement (4238)
1def with_maximum(self, width: int) -> "Measurement":
2 """Get a RenderableWith where the widths are <= width.
3
4 Args:
5 width (int): Maximum desired width.
6
7 Returns:
8 Measurement: New Measurement object.
9 """
10 minimum, maximum = self
11 return Measurement(min(minimum, width), min(maximum, width))