Merge pull request #6045 from TomJGooding/refactor-label-rename-renderable-to-content

refactor(label): rename renderable to content
This commit is contained in:
Will McGugan
2025-08-18 21:31:53 +01:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Changed
- Breaking change: The `renderable` property on the `Static` widget has been changed to `content`. https://github.com/Textualize/textual/pull/6041
- Breaking change: Renamed `Label` constructor argument `renderable` to `content` for consistency https://github.com/Textualize/textual/pull/6045
# [5.3.0] - 2025-08-07

View File

@@ -48,8 +48,7 @@ class Label(Static):
def __init__(
self,
# TODO: Should probably be renamed to `content`.
renderable: VisualType = "",
content: VisualType = "",
*,
variant: LabelVariant | None = None,
expand: bool = False,
@@ -61,7 +60,7 @@ class Label(Static):
disabled: bool = False,
) -> None:
super().__init__(
renderable,
content,
expand=expand,
shrink=shrink,
markup=markup,