Skip to content

Commit db3eb82

Browse files
committed
feat: add some colors.
1 parent 0b56454 commit db3eb82

File tree

2 files changed

+31
-7
lines changed

2 files changed

+31
-7
lines changed

src/cleez/cleez.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def get_command_name(self):
194194
return self.name
195195

196196

197-
def run(module_name: str="", argv=None):
197+
def run(module_name: str = "", argv=None):
198198
cli = CLI()
199199
if module_name:
200200
cli.scan(module_name)

src/cleez/colors.py

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,47 @@
11
from termcolor import colored
22

3+
# TODO ?
4+
# "light_grey": 37,
5+
# "dark_grey": 90,
6+
# "light_red": 91,
7+
# "light_green": 92,
8+
# "light_yellow": 93,
9+
# "light_blue": 94,
10+
# "light_magenta": 95,
11+
# "light_cyan": 96,
12+
# "white": 97,
313

4-
# Color helpers
5-
def blue(text):
6-
return colored(text, "blue")
714

8-
9-
def green(text):
10-
return colored(text, "green")
15+
# Color helpers
16+
def black(text):
17+
return colored(text, "black")
1118

1219

1320
def red(text):
1421
return colored(text, "red")
1522

1623

24+
def green(text):
25+
return colored(text, "green")
26+
27+
1728
def yellow(text):
1829
return colored(text, "yellow")
1930

2031

32+
def blue(text):
33+
return colored(text, "blue")
34+
35+
36+
def magenta(text):
37+
return colored(text, "magenta")
38+
39+
40+
def cyan(text):
41+
return colored(text, "cyan")
42+
43+
44+
# Variants
2145
def bold(text):
2246
return colored(text, attrs=["bold"])
2347

0 commit comments

Comments
 (0)