Skip to content

Commit 1bb6674

Browse files
authored
Merge pull request #40 from simonw/patch-1
Fix typo in example
2 parents 6dc2c6e + ed074ae commit 1bb6674

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/source/protocol.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ The ``__console__`` method should accept a :class:`~rich.console.Console` and a
3131
Here's an example of a ``__console__`` method::
3232

3333
from rich.console import Console, ConsoleOptions, RenderResult
34+
from rich.table import Table
3435

3536
@dataclass
3637
class Student:
@@ -39,7 +40,7 @@ Here's an example of a ``__console__`` method::
3940
age: int
4041
def __console__(self, console: Console, options: ConsoleOptions) -> RenderResult:
4142
yield f"[b]Student:[/b] #{self.id}"
42-
my_table = Table("Attribute, "Value")
43+
my_table = Table("Attribute", "Value")
4344
my_table.add_row("name", self.name)
4445
my_table.add_row("age", str(self.age))
4546
yield my_table

0 commit comments

Comments
 (0)