MCPcopy
hub / github.com/Textualize/textual / with_height

Method with_height

src/textual/geometry.py:245–254  ·  view source on GitHub ↗

Get a new Size with just the height changed. Args: height: New height. Returns: New Size instance.

(self, height: int)

Source from the content-addressed store, hash-verified

243 return Size(width, self.height)
244
245 def with_height(self, height: int) -> Size:
246 """Get a new Size with just the height changed.
247
248 Args:
249 height: New height.
250
251 Returns:
252 New Size instance.
253 """
254 return Size(self.width, height)
255
256 def __add__(self, other: object) -> Size:
257 if isinstance(other, tuple):

Callers 3

_compositor_refreshMethod · 0.80
_refresh_layoutMethod · 0.80
test_size_with_heightFunction · 0.80

Calls 1

SizeClass · 0.85

Tested by 1

test_size_with_heightFunction · 0.64