docstrings

This commit is contained in:
Will McGugan
2022-10-17 11:07:33 +01:00
parent 399d2cf9a6
commit 57654ed5fc
2 changed files with 9 additions and 2 deletions

View File

@@ -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 []

View File

@@ -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)