diff --git a/rich/tui/examples/simple.py b/rich/tui/examples/simple.py index 88a01d3452..7c8b9cdf69 100644 --- a/rich/tui/examples/simple.py +++ b/rich/tui/examples/simple.py @@ -1,6 +1,8 @@ +from rich.console import Console from rich.layout import Layout from rich.table import Table from rich.tui.app import App +from rich.tui.view import View from rich.widgets.color_changer import ColorChanger @@ -8,8 +10,13 @@ class SimpleApp(App): table: Table - def __init__(self): - super().__init__() + def __init__( + self, + console: Console = None, + view: View = None, + screen: bool = True, + ): + super().__init__(console, view, screen, title='Simple App') self.table = table = Table("foo", "bar", "baz") table.add_row("1", "2", "3") @@ -25,4 +32,4 @@ def visualize(self): if __name__ == "__main__": app = SimpleApp() - app.run_message_loop() + app.run()