summaryrefslogtreecommitdiffstats
path: root/color.py
diff options
context:
space:
mode:
Diffstat (limited to 'color.py')
-rw-r--r--color.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/color.py b/color.py
index 9200a298..33bc8779 100644
--- a/color.py
+++ b/color.py
@@ -36,7 +36,8 @@ ATTRS = {None :-1,
36 'blink' : 5, 36 'blink' : 5,
37 'reverse': 7} 37 'reverse': 7}
38 38
39RESET = "\033[m" 39RESET = "\033[m" # pylint: disable=W1401
40 # backslash is not anomalous
40 41
41def is_color(s): 42def is_color(s):
42 return s in COLORS 43 return s in COLORS
@@ -51,7 +52,7 @@ def _Color(fg = None, bg = None, attr = None):
51 52
52 if attr >= 0 or fg >= 0 or bg >= 0: 53 if attr >= 0 or fg >= 0 or bg >= 0:
53 need_sep = False 54 need_sep = False
54 code = "\033[" 55 code = "\033[" #pylint: disable=W1401
55 56
56 if attr >= 0: 57 if attr >= 0:
57 code += chr(ord('0') + attr) 58 code += chr(ord('0') + attr)