Skip to content

Commit 9045ec0

Browse files
authored
Merge pull request #2761 from davep/link-python-format-language
Link format string in docs to Python string formatting mini-language
2 parents 9d4a1f3 + ef5dbf4 commit 9045ec0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/source/progress.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ The progress bar(s) will use only as much of the width of the terminal as requir
101101
Columns
102102
~~~~~~~
103103

104-
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.
104+
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 <https://docs.python.org/3/library/string.html#formatspec>`_ or a :class:`~rich.progress.ProgressColumn` object.
105105

106106
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]}"``.
107107

0 commit comments

Comments
 (0)