fix startup spinner for non-C2 (#19536)

* limit build progress

* cleanup

* types

* comment
old-commit-hash: 71d317872a8df87e571a9078d874e776400df930
This commit is contained in:
Adeeb Shihadeh
2020-12-18 14:47:25 -08:00
committed by GitHub
parent 2fa44ccbbe
commit eb0fd3eaac
2 changed files with 19 additions and 21 deletions

View File

@@ -16,7 +16,7 @@ class Spinner():
def __enter__(self):
return self
def update(self, spinner_text):
def update(self, spinner_text: str):
if self.spinner_proc is not None:
self.spinner_proc.stdin.write(spinner_text.encode('utf8') + b"\n")
try:
@@ -24,7 +24,7 @@ class Spinner():
except BrokenPipeError:
pass
def update_progress(self, cur, total):
def update_progress(self, cur: int, total: int):
self.update(str(int(100 * cur / total)))
def close(self):