diff --git a/src/textual/app.py b/src/textual/app.py index 40cc145e1..a1bdfae04 100644 --- a/src/textual/app.py +++ b/src/textual/app.py @@ -700,6 +700,9 @@ class App(Generic[ReturnType], DOMNode): """Mount widgets. Widgets specified as positional args, or keywords args. If supplied as keyword args they will be assigned an id of the key. + Returns: + AwaitMount: An awaitable object that waits for widgets to be mounted. + """ mounted_widgets = self._register(self.screen, *anon_widgets, **widgets) return AwaitMount(mounted_widgets) @@ -1133,7 +1136,11 @@ class App(Generic[ReturnType], DOMNode): """Register widget(s) so they may receive events. Args: - parent (Widget): Parent Widget + parent (Widget): Parent Widget. + + Returns: + list[Widget]: List of modified widgets. + """ if not anon_widgets and not widgets: return [] diff --git a/src/textual/widget.py b/src/textual/widget.py index 31f6209f7..605157668 100644 --- a/src/textual/widget.py +++ b/src/textual/widget.py @@ -360,7 +360,7 @@ class Widget(DOMNode): ``` Returns: - AwaitMount: An awaitable that waits for widgets to be mounted. + AwaitMount: An awaitable object that waits for widgets to be mounted. """ mounted_widgets = self.app._register(self, *anon_widgets, **widgets)