Skip to content

Commit a44aa44

Browse files
committed
Add __str__ to ColorSystem so that Python 3.11 renders the same thing in a test
1 parent 562fab8 commit a44aa44

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

rich/color.py

+3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ class ColorSystem(IntEnum):
2929
def __repr__(self) -> str:
3030
return f"ColorSystem.{self.name}"
3131

32+
def __str__(self) -> str:
33+
return repr(self)
34+
3235

3336
class ColorType(IntEnum):
3437
"""Type of color stored in Color class."""

0 commit comments

Comments
 (0)