From 9654748dd70088dcbbe61d770e1ed2844d5b4a6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Gir=C3=A3o=20Serr=C3=A3o?= <5621605+RodrigoGiraoSerrao@users.noreply.github.com> Date: Fri, 25 Nov 2022 18:23:24 +0000 Subject: [PATCH] Update example and test files. --- docs/examples/widgets/placeholder.py | 16 ++++++++-------- tests/test_placeholder.py | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/examples/widgets/placeholder.py b/docs/examples/widgets/placeholder.py index d47cadeca..0c6499842 100644 --- a/docs/examples/widgets/placeholder.py +++ b/docs/examples/widgets/placeholder.py @@ -10,24 +10,24 @@ class PlaceholderApp(App): def compose(self) -> ComposeResult: yield Vertical( Container( - Placeholder(label="This is a custom label for p1.", id="p1"), - Placeholder(label="Placeholder p2 here!", id="p2"), + Placeholder("This is a custom label for p1.", id="p1"), + Placeholder("Placeholder p2 here!", id="p2"), Placeholder(id="p3"), Placeholder(id="p4"), Placeholder(id="p5"), Placeholder(), Horizontal( - Placeholder("size", id="col1"), - Placeholder("text", id="col2"), - Placeholder("size", id="col3"), + Placeholder(variant="size", id="col1"), + Placeholder(variant="text", id="col2"), + Placeholder(variant="size", id="col3"), id="c1", ), id="bot" ), Container( - Placeholder("text", id="left"), - Placeholder("size", id="topright"), - Placeholder("text", id="botright"), + Placeholder(variant="text", id="left"), + Placeholder(variant="size", id="topright"), + Placeholder(variant="text", id="botright"), id="top", ), id="content", diff --git a/tests/test_placeholder.py b/tests/test_placeholder.py index 74fe2e40f..6bc7a1e04 100644 --- a/tests/test_placeholder.py +++ b/tests/test_placeholder.py @@ -6,7 +6,7 @@ from textual.widgets._placeholder import InvalidPlaceholderVariant def test_invalid_placeholder_variant(): with pytest.raises(InvalidPlaceholderVariant): - Placeholder("this is clearly not a valid variant!") + Placeholder(variant="this is clearly not a valid variant!") def test_invalid_reactive_variant_change():