From 4c19cacb59c88083a80660f321a99a6cc5733407 Mon Sep 17 00:00:00 2001 From: Louis Sautier Date: Thu, 15 Aug 2024 06:59:32 +0200 Subject: [PATCH] Doc: fix some typos Signed-off-by: Louis Sautier --- docs/source/progress.rst | 2 +- rich/live.py | 2 +- rich/progress.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/progress.rst b/docs/source/progress.rst index 7a771c8d..5db381bc 100644 --- a/docs/source/progress.rst +++ b/docs/source/progress.rst @@ -131,7 +131,7 @@ Columns You may customize the columns in the progress display with the positional arguments to the :class:`~rich.progress.Progress` constructor. The columns are specified as either a `format string `_ or a :class:`~rich.progress.ProgressColumn` object. -Format strings will be rendered with a single value `"task"` which will be a :class:`~rich.progress.Task` instance. For example ``"{task.description}"`` would display the task description in the column, and ``"{task.completed} of {task.total}"`` would display how many of the total steps have been completed. Additional fields passed via keyword arguments to `~rich.progress.Progress.update` are store in ``task.fields``. You can add them to a format string with the following syntax: ``"extra info: {task.fields[extra]}"``. +Format strings will be rendered with a single value `"task"` which will be a :class:`~rich.progress.Task` instance. For example ``"{task.description}"`` would display the task description in the column, and ``"{task.completed} of {task.total}"`` would display how many of the total steps have been completed. Additional fields passed via keyword arguments to `~rich.progress.Progress.update` are stored in ``task.fields``. You can add them to a format string with the following syntax: ``"extra info: {task.fields[extra]}"``. The default columns are equivalent to the following:: diff --git a/rich/live.py b/rich/live.py index f0529a78..8738cf09 100644 --- a/rich/live.py +++ b/rich/live.py @@ -37,7 +37,7 @@ class Live(JupyterMixin, RenderHook): Args: renderable (RenderableType, optional): The renderable to live display. Defaults to displaying nothing. - console (Console, optional): Optional Console instance. Default will an internal Console instance writing to stdout. + console (Console, optional): Optional Console instance. Defaults to an internal Console instance writing to stdout. screen (bool, optional): Enable alternate screen mode. Defaults to False. auto_refresh (bool, optional): Enable auto refresh. If disabled, you will need to call `refresh()` or `update()` with refresh flag. Defaults to True refresh_per_second (float, optional): Number of times per second to refresh the live display. Defaults to 4. diff --git a/rich/progress.py b/rich/progress.py index effcab40..930d63e9 100644 --- a/rich/progress.py +++ b/rich/progress.py @@ -1056,7 +1056,7 @@ class Progress(JupyterMixin): """Renders an auto-updating progress bar(s). Args: - console (Console, optional): Optional Console instance. Default will an internal Console instance writing to stdout. + console (Console, optional): Optional Console instance. Defaults to an internal Console instance writing to stdout. auto_refresh (bool, optional): Enable auto refresh. If disabled, you will need to call `refresh()`. refresh_per_second (Optional[float], optional): Number of times per second to refresh the progress information or None to use default (10). Defaults to None. speed_estimate_period: (float, optional): Period (in seconds) used to calculate the speed estimate. Defaults to 30.