diff --git a/.gitignore b/.gitignore index df23e0ae..acbe050d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ mypy_report docs/build docs/source/_build +tools/*.txt # Byte-compiled / optimized / DLL files __pycache__/ diff --git a/rich/progress.py b/rich/progress.py index 5d0c9069..1fd95db7 100644 --- a/rich/progress.py +++ b/rich/progress.py @@ -412,6 +412,15 @@ class Progress: if refresh: self.refresh() + def advance(self, task_id: TaskID, advance: float = 1) -> None: + """Advance task by a number of steps. + + Args: + task_id (TaskID): ID of task. + advance (float): Number of steps to advance. Default is 1. + """ + self.update(task_id, advance=advance) + def refresh(self) -> None: """Refresh (render) the progress information.""" with self._lock: