diff --git a/src/textual/widgets/_help_panel.py b/src/textual/widgets/_help_panel.py index 1626e75a7f..9ed8421e1b 100644 --- a/src/textual/widgets/_help_panel.py +++ b/src/textual/widgets/_help_panel.py @@ -66,6 +66,11 @@ def on_mount(self): self.watch(self.screen, "focused", self.update_help) def update_help(self, focused_widget: Widget | None) -> None: + """Update the help for the focused widget. + + Args: + focused_widget: The currently focused widget, or `None` if no widget was focused. + """ if not self.app.app_focus: return self.set_class(focused_widget is not None, "-show-help")