Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Sep 30, 2024
1 parent 508c008 commit a48c790
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rich/progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -924,11 +924,11 @@ def render(self, task: "Task") -> Text:

class IterationSpeedColumn(ProgressColumn):
"""Renders iterations per second, e.g. '11.4 it/s'."""

def render(self, task: "Task") -> Text:
last_speed = task.last_speed if hasattr(task, 'last_speed') else None
last_speed = task.last_speed if hasattr(task, "last_speed") else None
if task.finished and last_speed is not None:
return Text(f"{last_speed} it/s", style="progress.data.speed")
return Text(f"{last_speed} it/s", style="progress.data.speed")
if task.speed is None:
return Text("", style="progress.data.speed")
unit, suffix = filesize.pick_unit_and_suffix(
Expand Down

0 comments on commit a48c790

Please sign in to comment.