Skip to content

Commit

Permalink
docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Aug 21, 2024
1 parent bcaa31b commit 990b1b3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/textual/widgets/_help_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 990b1b3

Please sign in to comment.