We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10b9f3e commit a73d300Copy full SHA for a73d300
cmd2/ansi.py
@@ -32,14 +32,8 @@ class ColorBase(Enum):
32
Base class for fg and bg classes
33
This expects the child classes to define enums of: color name -> ANSI color sequence
34
"""
35
- def __str__(self) -> str:
36
- """Return ANSI color sequence instead of enum name"""
37
- return self.value
38
-
39
def __add__(self, other: Any) -> str:
40
"""Return self + other as string"""
41
- if isinstance(other, (fg, bg)):
42
- other = str(other)
43
return self.value + other
44
45
def __radd__(self, other: Any) -> str:
0 commit comments