Skip to content

Commit 0e53bae

Browse files
authored
Merge branch 'master' into theme-read-encoding
2 parents 5f923e8 + b2f9987 commit 0e53bae

18 files changed

+1201
-1022
lines changed

.github/workflows/pythonpackage.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
matrix:
1010
os: [windows-latest, ubuntu-latest, macos-latest]
11-
python-version: ["3.7", "3.8", "3.9", "3.10"]
11+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11.0"]
1212
defaults:
1313
run:
1414
shell: bash

CHANGELOG.md

+23
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
- Added `encoding` parameter in `Theme.read`
1313

14+
15+
## [13.2.0] - 2023-01-19
16+
17+
### Changed
18+
19+
- Switch Markdown parsing from commonmark to markdown-it-py https://github.com/Textualize/rich/pull/2439
20+
21+
## [13.1.0] - 2023-01-14
22+
23+
### Fixed
24+
25+
- Fixed wrong filenames in Jupyter tracebacks https://github.com/Textualize/rich/issues/2271
26+
27+
### Added
28+
29+
- Added locals_hide_dunder and locals_hide_sunder to Tracebacks, to hide double underscore and single underscore locals. https://github.com/Textualize/rich/pull/2754
30+
31+
### Changed
32+
33+
- Tracebacks will now hide double underscore names from locals by default. Set `locals_hide_dunder=False` to restore previous behaviour.
34+
1435
## [13.0.1] - 2023-01-06
1536

1637
### Fixed
@@ -1866,6 +1887,8 @@ Major version bump for a breaking change to `Text.stylize signature`, which corr
18661887

18671888
- First official release, API still to be stabilized
18681889

1890+
[13.2.0]: https://github.com/textualize/rich/compare/v13.1.0...v13.2.0
1891+
[13.1.0]: https://github.com/textualize/rich/compare/v13.0.1...v13.1.0
18691892
[13.0.1]: https://github.com/textualize/rich/compare/v13.0.0...v13.0.1
18701893
[13.0.0]: https://github.com/textualize/rich/compare/v12.6.0...v13.0.0
18711894
[12.6.0]: https://github.com/textualize/rich/compare/v12.5.2...v12.6.0

docs/source/highlighting.rst

+10-3
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
Highlighting
44
============
55

6-
Rich can apply styles to patterns in text which you :meth:`~rich.console.Console.print` or :meth:`~rich.console.Console.log`. With the default settings, Rich will highlight things such as numbers, strings, collections, booleans, None, and a few more exotic patterns such as file paths, URLs and UUIDs.
7-
Additional non-default highlighter are available, such as :class:`~rich.highlighter.ISO8601Highlighter` to highlight date and time.
6+
Rich will automatically highlight patterns in text, such as numbers, strings, collections, booleans, None, and a few more exotic patterns such as file paths, URLs and UUIDs.
87

9-
You can disable highlighting either by setting ``highlight=False`` on :meth:`~rich.console.Console.print` or :meth:`~rich.console.Console.log`, or by setting ``highlight=False`` on the :class:`~rich.console.Console` constructor which disables it everywhere. If you disable highlighting on the constructor, you can still selectively *enable* highlighting with ``highlight=True`` on print/log.
8+
You can disable highlighting either by setting ``highlight=False`` on :meth:`~rich.console.Console.print` or :meth:`~rich.console.Console.log`, or by setting ``highlight=False`` on the :class:`~rich.console.Console` constructor which disables it everywhere. If you disable highlighting on the constructor, you can still selectively *enable* highlighting with ``highlight=True`` on print / log.
109

1110
Custom Highlighters
1211
-------------------
@@ -59,3 +58,11 @@ Here's a silly example that highlights every character with a different color::
5958

6059
rainbow = RainbowHighlighter()
6160
print(rainbow("I must not fear. Fear is the mind-killer."))
61+
62+
Builtin Highlighters
63+
--------------------
64+
65+
The following builtin highlighters are available.
66+
67+
* :class:`~rich.highlighter.ISO8601Highlighter` Highlights ISO8601 date time strings.
68+
* :class:`~rich.highlighter.JSONHighlighter` Highlights JSON formatted strings.

docs/source/progress.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Transient progress displays are useful if you want more minimal output in the te
8282
Indeterminate progress
8383
~~~~~~~~~~~~~~~~~~~~~~
8484

85-
When you add a task it is automatically *started*, which means it will show a progress bar at 0% and the time remaining will be calculated from the current time. This may not work well if there is a long delay before you can start updating progress; you may need to wait for a response from a server or count files in a directory (for example). In these cases you can call :meth:`~rich.progress.Progress.add_task` with ``start=False`` or ``total=None`` which will display a pulsing animation that lets the user know something is working. This is know as an *indeterminate* progress bar. When you have the number of steps you can call :meth:`~rich.progress.Progress.start_task` which will display the progress bar at 0%, then :meth:`~rich.progress.Progress.update` as normal.
85+
When you add a task it is automatically *started*, which means it will show a progress bar at 0% and the time remaining will be calculated from the current time. This may not work well if there is a long delay before you can start updating progress; you may need to wait for a response from a server or count files in a directory (for example). In these cases you can call :meth:`~rich.progress.Progress.add_task` with ``start=False`` or ``total=None`` which will display a pulsing animation that lets the user know something is working. This is known as an *indeterminate* progress bar. When you have the number of steps you can call :meth:`~rich.progress.Progress.start_task` which will display the progress bar at 0%, then :meth:`~rich.progress.Progress.update` as normal.
8686

8787
Auto refresh
8888
~~~~~~~~~~~~
@@ -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

docs/source/syntax.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ The Syntax constructor (and :meth:`~rich.syntax.Syntax.from_path`) accept a ``th
4141
Background color
4242
----------------
4343

44-
You can override the background color from the theme by supplying a ``background_color`` argument to the constructor. This should be a string in the same format a style definition accepts, .e.g "red", "#ff0000", "rgb(255,0,0)" etc. You may also set the special value "default" which will use the default background color set in the terminal.
44+
You can override the background color from the theme by supplying a ``background_color`` argument to the constructor. This should be a string in the same format a style definition accepts, e.g. "red", "#ff0000", "rgb(255,0,0)" etc. You may also set the special value "default" which will use the default background color set in the terminal.
4545

4646

4747
Syntax CLI

docs/source/tables.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ There are a number of keyword arguments on the Table constructor you can use to
5656
- ``min_width`` Sets a minimum width for the table.
5757
- ``box`` Sets one of the :ref:`appendix_box` styles for the table grid, or ``None`` for no grid.
5858
- ``safe_box`` Set to ``True`` to force the table to generate ASCII characters rather than unicode.
59-
- ``padding`` A integer, or tuple of 1, 2, or 4 values to set the padding on cells.
59+
- ``padding`` An integer, or tuple of 1, 2, or 4 values to set the padding on cells.
6060
- ``collapse_padding`` If True the padding of neighboring cells will be merged.
6161
- ``pad_edge`` Set to False to remove padding around the edge of the table.
6262
- ``expand`` Set to True to expand the table to the full available size.

0 commit comments

Comments
 (0)