mirror of
https://github.com/Textualize/rich.git
synced 2025-12-23 07:08:35 +00:00
words
This commit is contained in:
parent
a9d723dd69
commit
7111aa9d6e
2 changed files with 7 additions and 1 deletions
|
|
@ -166,4 +166,8 @@ This will change the output of the Rich repr example to the following::
|
|||
}
|
||||
|
||||
|
||||
Note that you can add ``__rich_repr__`` methods to third-party libraries *without* including Rich as a dependency. If Rich is not installed, then nothing will break. Hopefully more third-party libraries will adopt Rich repr methods in the future.
|
||||
Note that you can add ``__rich_repr__`` methods to third-party libraries *without* including Rich as a dependency. If Rich is not installed, then nothing will break. Hopefully more third-party libraries will adopt Rich repr methods in the future.
|
||||
|
||||
## Example
|
||||
|
||||
See `repr.py <https://github.com/willmcgugan/rich/blob/master/examples/repr.py>`_ for the example code used in this page.
|
||||
|
|
@ -15,6 +15,8 @@ class Bird:
|
|||
yield "fly", self.fly, True
|
||||
yield "extinct", self.extinct, False
|
||||
|
||||
# __rich_repr__.angular = True
|
||||
|
||||
|
||||
from rich import print
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue