From 3c5fcc668dc406ddae07020589e7acea1d9ae04c Mon Sep 17 00:00:00 2001 From: Obijuan Date: Tue, 19 Mar 2024 11:47:28 +0100 Subject: [PATCH] lint --- apio/managers/scons.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/apio/managers/scons.py b/apio/managers/scons.py index 93c6a1bb..a4fa97c7 100644 --- a/apio/managers/scons.py +++ b/apio/managers/scons.py @@ -993,19 +993,18 @@ def _execute_scons(self, command: str, variables: list, board: str) -> int: def _on_stdout(line): # ---- Fomu output processing BEGIN - #pattern_fomu = r"^Download\s*\[=*\]\s\d{1,3}%" + # pattern_fomu = r"^Download\s*\[=*\]\s\d{1,3}%" pattern_fomu = r"^Download\s*\[=*" match = re.search(pattern_fomu, line) if match: - # -- Delete the previous line + # -- Delete the previous line print(CURSOR_UP + ERASE_LINE, end="") # ---- Fomu output processing END - + fgcol = "green" if "is up to date" in line else None fgcol = "green" if match else fgcol click.secho(line, fg=fgcol) - @staticmethod def _on_stderr(line: str): """Callback function. It is called when the running command @@ -1054,9 +1053,6 @@ def _on_stderr(line: str): # -- Delete the previous line print(CURSOR_UP + ERASE_LINE, end="") # ------- Iceprog output processing END - - - # -- Print the line (In YELLOW) # -- In case of error print it in RED