Remove unused code (#1214)

main
Selwin Ong 5 years ago committed by GitHub
parent add0b171ec
commit a090e9e840
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -70,30 +70,6 @@ class _Colorizer(object):
else: else:
return self.codes[color_key] + text + self.codes["reset"] return self.codes[color_key] + text + self.codes["reset"]
def ansiformat(self, attr, text):
"""
Format ``text`` with a color and/or some attributes::
color normal color
*color* bold color
_color_ underlined color
+color+ blinking color
"""
result = []
if attr[:1] == attr[-1:] == '+':
result.append(self.codes['blink'])
attr = attr[1:-1]
if attr[:1] == attr[-1:] == '*':
result.append(self.codes['bold'])
attr = attr[1:-1]
if attr[:1] == attr[-1:] == '_':
result.append(self.codes['underline'])
attr = attr[1:-1]
result.append(self.codes[attr])
result.append(text)
result.append(self.codes['reset'])
return ''.join(result)
colorizer = _Colorizer() colorizer = _Colorizer()

Loading…
Cancel
Save