From 488b5dc8d354d537cc6014f51f66a3bf1f388df9 Mon Sep 17 00:00:00 2001 From: derthorsten Date: Sun, 1 Dec 2019 15:45:45 +0100 Subject: [PATCH] added missing functions --- hooks/pre_gen_project.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hooks/pre_gen_project.py b/hooks/pre_gen_project.py index c73f003..c4b16a3 100644 --- a/hooks/pre_gen_project.py +++ b/hooks/pre_gen_project.py @@ -6,6 +6,15 @@ logging.basicConfig() LOGGER = logging.getLogger(__name__) MODULE_REGEX = r"^[_a-zA-Z][_a-zA-Z0-9]+$" +class bcolors: + WARNING = "\033[93m" + ENDC = "\033[0m" + BOLD = "\033[1m" + + +def colorize(escape_code, text): + code = getattr(bcolors, escape_code) + return f"{code}{text}{bcolors.ENDC}" def log_module_name_warning(module_name, logger):