summaryrefslogtreecommitdiff
path: root/src/buildstream/_frontend/status.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildstream/_frontend/status.py')
-rw-r--r--src/buildstream/_frontend/status.py48
1 files changed, 7 insertions, 41 deletions
diff --git a/src/buildstream/_frontend/status.py b/src/buildstream/_frontend/status.py
index 577fd40c5..0fd44d09b 100644
--- a/src/buildstream/_frontend/status.py
+++ b/src/buildstream/_frontend/status.py
@@ -50,15 +50,7 @@ class Status:
_TERM_CAPABILITIES = {"move_up": "cuu1", "move_x": "hpa", "clear_eol": "el"}
def __init__(
- self,
- context,
- state,
- content_profile,
- format_profile,
- success_profile,
- error_profile,
- stream,
- colors=False,
+ self, context, state, content_profile, format_profile, success_profile, error_profile, stream, colors=False,
):
self._context = context
@@ -73,13 +65,7 @@ class Status:
self._spacing = 1
self._colors = colors
self._header = _StatusHeader(
- context,
- state,
- content_profile,
- format_profile,
- success_profile,
- error_profile,
- stream,
+ context, state, content_profile, format_profile, success_profile, error_profile, stream,
)
self._term_width, _ = click.get_terminal_size()
@@ -317,14 +303,7 @@ class Status:
def _add_job(self, action_name, full_name):
task = self._state.tasks[(action_name, full_name)]
elapsed = task.elapsed_offset
- job = _StatusJob(
- self._context,
- action_name,
- full_name,
- self._content_profile,
- self._format_profile,
- elapsed,
- )
+ job = _StatusJob(self._context, action_name, full_name, self._content_profile, self._format_profile, elapsed,)
self._jobs[(action_name, full_name)] = job
self._need_alloc = True
@@ -355,14 +334,7 @@ class Status:
#
class _StatusHeader:
def __init__(
- self,
- context,
- state,
- content_profile,
- format_profile,
- success_profile,
- error_profile,
- stream,
+ self, context, state, content_profile, format_profile, success_profile, error_profile, stream,
):
#
@@ -518,9 +490,7 @@ class _StatusHeader:
# elapsed (datetime): The offset into the session when this job is created
#
class _StatusJob:
- def __init__(
- self, context, action_name, full_name, content_profile, format_profile, elapsed
- ):
+ def __init__(self, context, action_name, full_name, content_profile, format_profile, elapsed):
#
# Public members
#
@@ -612,13 +582,9 @@ class _StatusJob:
)
if self._current_progress is not None:
- text += self._format_profile.fmt(":") + self._content_profile.fmt(
- str(self._current_progress)
- )
+ text += self._format_profile.fmt(":") + self._content_profile.fmt(str(self._current_progress))
if self._maximum_progress is not None:
- text += self._format_profile.fmt("/") + self._content_profile.fmt(
- str(self._maximum_progress)
- )
+ text += self._format_profile.fmt("/") + self._content_profile.fmt(str(self._maximum_progress))
# Add padding before terminating ']'
terminator = (" " * padding) + "]"