From a090e9e8406ffdc200719e2dff4fbfd9ca6a1870 Mon Sep 17 00:00:00 2001 From: Selwin Ong Date: Mon, 9 Mar 2020 20:00:35 +0700 Subject: [PATCH] Remove unused code (#1214) --- rq/utils.py | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/rq/utils.py b/rq/utils.py index c399b55..0f63125 100644 --- a/rq/utils.py +++ b/rq/utils.py @@ -70,30 +70,6 @@ class _Colorizer(object): else: 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()