diff --git a/README.md b/README.md index 1b51d8a9..3bbb232d 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ The log method could be used for logging to the terminal for long running applic ### Logging Handler -You can also use the builtin [Handler class](https://rich.readthedocs.io/en/latest/logging.html) to format and colorize output form Python's logging module. Here's an example of the output: +You can also use the builtin [Handler class](https://rich.readthedocs.io/en/latest/logging.html) to format and colorize output from Python's logging module. Here's an example of the output: ![Logging](https://github.com/willmcgugan/rich/blob/master/imgs/logging.png) diff --git a/docs/source/protocol.rst b/docs/source/protocol.rst index 7b133e9e..cde5fbd2 100644 --- a/docs/source/protocol.rst +++ b/docs/source/protocol.rst @@ -31,6 +31,7 @@ The ``__console__`` method should accept a :class:`~rich.console.Console` and a Here's an example of a ``__console__`` method:: from rich.console import Console, ConsoleOptions, RenderResult + from rich.table import Table @dataclass class Student: @@ -39,7 +40,7 @@ Here's an example of a ``__console__`` method:: age: int def __console__(self, console: Console, options: ConsoleOptions) -> RenderResult: yield f"[b]Student:[/b] #{self.id}" - my_table = Table("Attribute, "Value") + my_table = Table("Attribute", "Value") my_table.add_row("name", self.name) my_table.add_row("age", str(self.age)) yield my_table