Skip to content

Commit 5ce3f0b

Browse files
committed
Removed unused AnsiSequence class.
1 parent 42da841 commit 5ce3f0b

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

cmd2/terminal_utils.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
These are used for things like setting the window title and asynchronous alerts.
44
"""
55

6-
from typing import Any
7-
86
from .string_utils import str_width
97

108
#######################################################
@@ -61,27 +59,6 @@ def clear_line_str(clear_type: int = 2) -> str:
6159
raise ValueError("clear_type must in an integer from 0 to 2")
6260

6361

64-
####################################################################################
65-
# Base classes which are not intended to be used directly
66-
####################################################################################
67-
class AnsiSequence:
68-
"""Base class to create ANSI sequence strings."""
69-
70-
def __add__(self, other: Any) -> str:
71-
"""Support building an ANSI sequence string when self is the left operand.
72-
73-
e.g. Fg.LIGHT_MAGENTA + "hello"
74-
"""
75-
return str(self) + str(other)
76-
77-
def __radd__(self, other: Any) -> str:
78-
"""Support building an ANSI sequence string when self is the right operand.
79-
80-
e.g. "hello" + Fg.RESET
81-
"""
82-
return str(other) + str(self)
83-
84-
8562
####################################################################################
8663
# Implementations intended for direct use (do NOT use outside of cmd2)
8764
####################################################################################

0 commit comments

Comments
 (0)