From 5a15e9c8aafa1e510170e173590ae335fba40549 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: Mon, 11 Sep 2023 11:37:44 +0100 Subject: [PATCH] Add docstrings to properties. Related comment: https://github.com/Textualize/textual/pull/3199#discussion_r1321288977 --- src/textual/widgets/_header.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/textual/widgets/_header.py b/src/textual/widgets/_header.py index 5a1155f14e..2c1bcaf326 100644 --- a/src/textual/widgets/_header.py +++ b/src/textual/widgets/_header.py @@ -162,12 +162,20 @@ def _on_click(self): @property def screen_title(self) -> str: + """The title that this header will display. + + This depends on [`Screen.title`][textual.screen.Screen.title] and [`App.title`][textual.app.App.title]. + """ screen_title = self.screen.title title = screen_title if screen_title is not None else self.app.title return title @property def screen_sub_title(self) -> str: + """The sub-title that this header will display. + + This depends on [`Screen.sub_title`][textual.screen.Screen.sub_title] and [`App.sub_title`][textual.app.App.sub_title]. + """ screen_sub_title = self.screen.sub_title sub_title = ( screen_sub_title if screen_sub_title is not None else self.app.sub_title