replace cwwidth

This commit is contained in:
Will McGugan 2020-03-15 15:45:45 +00:00
parent 15df025a5a
commit 82a11b9960
2 changed files with 10 additions and 0 deletions

1
.gitignore vendored
View File

@ -4,6 +4,7 @@
mypy_report
docs/build
docs/source/_build
tools/*.txt
# Byte-compiled / optimized / DLL files
__pycache__/

View File

@ -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: