Get a RenderableWith where the widths are <= width. Args: width (int): Maximum desired width. Returns: Measurement: New Measurement object.
(self, width: int)
| 32 | return Measurement(max(0, minimum), max(0, max(minimum, maximum))) |
| 33 | |
| 34 | def with_maximum(self, width: int) -> "Measurement": |
| 35 | """Get a RenderableWith where the widths are <= width. |
| 36 | |
| 37 | Args: |
| 38 | width (int): Maximum desired width. |
| 39 | |
| 40 | Returns: |
| 41 | Measurement: New Measurement object. |
| 42 | """ |
| 43 | minimum, maximum = self |
| 44 | return Measurement(min(minimum, width), min(maximum, width)) |
| 45 | |
| 46 | def with_minimum(self, width: int) -> "Measurement": |
| 47 | """Get a RenderableWith where the widths are >= width. |
no test coverage detected