We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6dc2c6e + ed074ae commit 1bb6674Copy full SHA for 1bb6674
docs/source/protocol.rst
@@ -31,6 +31,7 @@ The ``__console__`` method should accept a :class:`~rich.console.Console` and a
31
Here's an example of a ``__console__`` method::
32
33
from rich.console import Console, ConsoleOptions, RenderResult
34
+ from rich.table import Table
35
36
@dataclass
37
class Student:
@@ -39,7 +40,7 @@ Here's an example of a ``__console__`` method::
39
40
age: int
41
def __console__(self, console: Console, options: ConsoleOptions) -> RenderResult:
42
yield f"[b]Student:[/b] #{self.id}"
- my_table = Table("Attribute, "Value")
43
+ my_table = Table("Attribute", "Value")
44
my_table.add_row("name", self.name)
45
my_table.add_row("age", str(self.age))
46
yield my_table
0 commit comments