Skip to content

Commit

Permalink
add rich repr
Browse files Browse the repository at this point in the history
  • Loading branch information
axtimhaus committed Jul 27, 2023
1 parent 7478739 commit 9ee26b4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pyroll/core/repr.py
Expand Up @@ -47,3 +47,7 @@ def _repr_html_(self):

buf.append("</table>")
return ''.join(buf)

def __rich_repr__(self):
"""Pretty printing for Rich."""
yield from sorted(self.__attrs__.items())

0 comments on commit 9ee26b4

Please sign in to comment.