Update just the width, return a copy. Args: width (int): New width (sets both min_width and max_width) Returns: ~ConsoleOptions: New console options instance.
(self, width: int)
| 192 | return options |
| 193 | |
| 194 | def update_width(self, width: int) -> "ConsoleOptions": |
| 195 | """Update just the width, return a copy. |
| 196 | |
| 197 | Args: |
| 198 | width (int): New width (sets both min_width and max_width) |
| 199 | |
| 200 | Returns: |
| 201 | ~ConsoleOptions: New console options instance. |
| 202 | """ |
| 203 | options = self.copy() |
| 204 | options.min_width = options.max_width = max(0, width) |
| 205 | return options |
| 206 | |
| 207 | def update_height(self, height: int) -> "ConsoleOptions": |
| 208 | """Update the height, and return a copy. |