diff --git a/src/util/color.py b/src/util/color.py index dc4c785..bcbef4f 100644 --- a/src/util/color.py +++ b/src/util/color.py @@ -4,11 +4,11 @@ from src.util import command class Color: def get_256_color(color): """Get color using tput (256-colors base)""" - return command.get_output(f'tput setaf {color}') + return command.get_output(f"tput setaf {color}") def get_special_color(index): """Get special colors using tput (like bold, etc..)""" - return command.get_output(f'tput {index}') + return command.get_output(f"tput {index}") RED = get_256_color(196) BLUE = get_256_color(51) @@ -17,5 +17,5 @@ class Color: GOLD = get_256_color(214) GREY = get_256_color(238) - RESET = get_special_color('sgr0') - BOLD = get_special_color('bold') + RESET = get_special_color("sgr0") + BOLD = get_special_color("bold") diff --git a/src/util/command.py b/src/util/command.py index 2aa260b..550414a 100644 --- a/src/util/command.py +++ b/src/util/command.py @@ -3,23 +3,23 @@ import subprocess def execute(command) -> None: """Execute bash `command`, return the returncode (int)""" - command = command.split(' ') + command = command.split(" ") subprocess.call(command) def get_output(command) -> str: """Get standard output of `command`""" - command = command.split(' ') + command = command.split(" ") return subprocess.run( command, stderr=subprocess.STDOUT, stdout=subprocess.PIPE - ).stdout.decode('utf-8') + ).stdout.decode("utf-8") def get_return_code(command) -> int: """get return code of `command` (int)""" - command = command.split(' ') + command = command.split(" ") return subprocess.run( command, stderr=subprocess.STDOUT,