@@ -940,8 +940,6 @@ def __str__(self) -> str:
940
940
return self ._sequence
941
941
942
942
943
- # TODO: Remove this PyShadowingNames usage when deprecated fg and bg classes are removed.
944
- # noinspection PyShadowingNames
945
943
def style (
946
944
value : Any ,
947
945
* ,
@@ -1086,68 +1084,3 @@ def async_alert_str(*, terminal_columns: int, prompt: str, line: str, cursor_off
1086
1084
# Move the cursor to the beginning of the first prompt line and print the alert
1087
1085
terminal_str += '\r ' + alert_msg
1088
1086
return terminal_str
1089
-
1090
-
1091
- ####################################################################################
1092
- # The following classes are deprecated.
1093
- ####################################################################################
1094
- # noinspection PyPep8Naming
1095
- class fg (FgColor , Enum ):
1096
- """Deprecated Enum class for foreground colors. Use Fg instead."""
1097
-
1098
- black = 30
1099
- red = 31
1100
- green = 32
1101
- yellow = 33
1102
- blue = 34
1103
- magenta = 35
1104
- cyan = 36
1105
- white = 37
1106
- reset = 39
1107
- bright_black = 90
1108
- bright_red = 91
1109
- bright_green = 92
1110
- bright_yellow = 93
1111
- bright_blue = 94
1112
- bright_magenta = 95
1113
- bright_cyan = 96
1114
- bright_white = 97
1115
-
1116
- def __str__ (self ) -> str :
1117
- """
1118
- Return ANSI color sequence instead of enum name
1119
- This is helpful when using an fg in an f-string or format() call
1120
- e.g. my_str = f"{fg.blue}hello{fg.reset}"
1121
- """
1122
- return f"{ CSI } { self .value } m"
1123
-
1124
-
1125
- # noinspection PyPep8Naming
1126
- class bg (BgColor , Enum ):
1127
- """Deprecated Enum class for background colors. Use Bg instead."""
1128
-
1129
- black = 40
1130
- red = 41
1131
- green = 42
1132
- yellow = 43
1133
- blue = 44
1134
- magenta = 45
1135
- cyan = 46
1136
- white = 47
1137
- reset = 49
1138
- bright_black = 100
1139
- bright_red = 101
1140
- bright_green = 102
1141
- bright_yellow = 103
1142
- bright_blue = 104
1143
- bright_magenta = 105
1144
- bright_cyan = 106
1145
- bright_white = 107
1146
-
1147
- def __str__ (self ) -> str :
1148
- """
1149
- Return ANSI color sequence instead of enum name
1150
- This is helpful when using a bg in an f-string or format() call
1151
- e.g. my_str = f"{bg.black}hello{bg.reset}"
1152
- """
1153
- return f"{ CSI } { self .value } m"
0 commit comments