Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Obijuan committed Mar 19, 2024
1 parent 45e4365 commit 3c5fcc6
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions apio/managers/scons.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3c5fcc6

Please sign in to comment.