Skip to content

Commit

Permalink
Add __str__ to ColorSystem so that Python 3.11 renders the same thing…
Browse files Browse the repository at this point in the history
… in a test
  • Loading branch information
darrenburns committed Jul 15, 2022
1 parent 562fab8 commit a44aa44
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rich/color.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ class ColorSystem(IntEnum):
def __repr__(self) -> str:
return f"ColorSystem.{self.name}"

def __str__(self) -> str:
return repr(self)


class ColorType(IntEnum):
"""Type of color stored in Color class."""
Expand Down

0 comments on commit a44aa44

Please sign in to comment.