From 0f62d130f057658a651ef582f23f329ca5b04b97 Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Mon, 29 Apr 2024 10:23:20 +0100 Subject: [PATCH] docstring --- src/textual/widgets/_button.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/textual/widgets/_button.py b/src/textual/widgets/_button.py index 532076c9f8..551a9d4816 100644 --- a/src/textual/widgets/_button.py +++ b/src/textual/widgets/_button.py @@ -253,10 +253,13 @@ async def _on_click(self, event: events.Click) -> None: self.press() def press(self) -> Self: - """Respond to a button press. + """Animate the button and send the [Pressed][textual.widgets.button.Button.Pressed] message. + + Can be used to simulate the button being pressed by a user. Returns: - The button instance.""" + The button instance. + """ if self.disabled or not self.display: return self # Manage the "active" effect: