mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Tidy up some empty yields
This commit is contained in:
@@ -158,8 +158,7 @@ class ChopsUpdate:
|
||||
yield new_line
|
||||
|
||||
def __rich_repr__(self) -> rich.repr.Result:
|
||||
return
|
||||
yield
|
||||
yield from ()
|
||||
|
||||
|
||||
@rich.repr.auto(angular=True)
|
||||
|
||||
@@ -155,8 +155,7 @@ class Parser(Generic[T]):
|
||||
yield popleft()
|
||||
|
||||
def parse(self, on_token: Callable[[T], None]) -> Generator[Awaitable, str, None]:
|
||||
return
|
||||
yield
|
||||
yield from ()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -383,8 +383,7 @@ class App(Generic[ReturnType], DOMNode):
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
"""Yield child widgets for a container."""
|
||||
return
|
||||
yield
|
||||
yield from ()
|
||||
|
||||
def get_css_variables(self) -> dict[str, str]:
|
||||
"""Get a mapping of variables used to pre-populate CSS.
|
||||
|
||||
@@ -23,8 +23,7 @@ class Event(Message):
|
||||
"""The base class for all events."""
|
||||
|
||||
def __rich_repr__(self) -> rich.repr.Result:
|
||||
return
|
||||
yield
|
||||
yield from ()
|
||||
|
||||
|
||||
@rich.repr.auto
|
||||
|
||||
@@ -401,8 +401,7 @@ class Widget(DOMNode):
|
||||
```
|
||||
|
||||
"""
|
||||
return
|
||||
yield
|
||||
yield from ()
|
||||
|
||||
def _post_register(self, app: App) -> None:
|
||||
"""Called when the instance is registered.
|
||||
|
||||
Reference in New Issue
Block a user