From a44aa4473873b92ea528684cb3d6a27c2fe853b3 Mon Sep 17 00:00:00 2001 From: Darren Burns Date: Fri, 15 Jul 2022 11:33:23 +0100 Subject: [PATCH] Add __str__ to ColorSystem so that Python 3.11 renders the same thing in a test --- rich/color.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rich/color.py b/rich/color.py index 6bca2da9..9031ae37 100644 --- a/rich/color.py +++ b/rich/color.py @@ -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."""