Commit graph

57 commits

Author SHA1 Message Date
Will McGugan
da4f6bc797 fix for empty dataclass 2023-02-19 22:51:55 +00:00
Hugo van Kemenade
48d22353a2 Remove redundant Python 3.6 code 2022-10-11 17:30:10 +02:00
Will McGugan
ec54261a3e
Merge branch 'master' into fix-cyclic-references-handling 2022-09-20 11:10:22 +01:00
Will McGugan
f0cbc468ca
Merge branch 'master' into tuple-rich-repr-positional 2022-09-19 10:57:41 +01:00
Jim Crist-Harif
02dffcf9cf Fix pretty cyclic reference handling
Previously cyclic references were only handled for container and
dataclass types, but not namedtuple, attrs, or custom types. This fixes
that, and expands the tests to cover these cases.
2022-09-14 15:32:11 -05:00
Darren Burns
ffe9ae82f6
Supporting no stdout, tests 2022-09-07 15:26:05 +01:00
Will McGugan
e2716d3cd0
Merge pull request #2491 from multimeric/max-depth-install
Add max_depth arg to install()
2022-08-26 11:31:00 +01:00
Michael Milton
13506c2367 Add max_depth arg to install() 2022-08-26 01:53:54 +10:00
Michael Milton
fc13d7c19e Add delimiters to elided pretty prints 2022-08-25 15:36:16 +10:00
darrenburns
0425c792c1
Parse escape codes in Pretty repr (#2470)
* Parse ANSI escape codes in pretty reprs

* Fix mypy issue

* Test parse escape codes in Pretty repr

* Add CHANGELOG entry for parsing escape codes in Pretty reprs

Co-authored-by: Will McGugan <willmcgugan@gmail.com>
2022-08-17 15:32:56 +01:00
Darren Burns
c94d53e532 Fix some tests on 3.11 2022-07-14 16:48:46 +01:00
Saul Shanabrook
21b51aa9b3 Remove extra newline 2022-07-05 13:56:26 +00:00
Saul Shanabrook
0232b2b850
Remove extra newline 2022-07-05 09:51:02 -04:00
Saul Shanabrook
833c912b41
Add support for tuples as positional arguments in rich repr
Currently, it isn't possible to use tuples as positional arguments from `__rich_repr__`, because they are special cased to support adding a key and a default value.

This adds support for them, by allowing `None` as a key.
2022-07-05 09:44:49 -04:00
Olivier Philippon
6fb7d4b856 [jupyter] bypass the pretty-rendering of some specific graphics-related classes
Matplotlib "Artists", for example, manage their own rendering in a Jupyter notebook, and we should not try to render them too.
2022-06-28 15:22:17 +01:00
Darren Burns
26910c309d
In Pretty, when namedtuples have custom reprs, use them instead of our own 2022-03-08 11:38:52 +00:00
Darren Burns
934c6ef720
Testing pretty.py - objects similar to namedtuples, namedtuple max_depth 2022-03-07 13:31:56 +00:00
Darren Burns
5d3cc7ea8c
Add support for named tuples to pretty 2022-03-07 11:38:51 +00:00
Will McGugan
3b1518f943 sorted 2022-02-26 19:03:23 +00:00
Darren Burns
0c765bce3c
Merge branch 'master' into 1717-jupyter-pretty 2022-01-06 15:26:01 +00:00
Will McGugan
dafb1d567f Merge branch 'max-depth' of github.com:willmcgugan/rich into max-depth 2022-01-06 15:07:24 +00:00
Will McGugan
bff7981788 test max depth of None 2022-01-06 15:07:05 +00:00
Will McGugan
76b5dd233a
Update tests/test_pretty.py
Co-authored-by: Darren Burns <darrenburns@users.noreply.github.com>
2022-01-06 15:04:47 +00:00
Darren Burns
a3fcdbe210 Extract ipy display hook and add tests around it 2022-01-06 14:17:34 +00:00
Will McGugan
01f95d7e81 max depth arg 2022-01-06 10:33:18 +00:00
Will McGugan
86032f6354 exclude 36 2021-11-28 16:00:04 +00:00
Will McGugan
aeac63da7a conditional test 2021-11-28 13:09:08 +00:00
Will McGugan
07d51ffc1a race condition and tests 2021-11-27 19:41:29 +00:00
Will McGugan
7657a8e8f9 fix trailing comma 2021-11-07 15:59:12 +00:00
Will McGugan
b5fc0f8dd8 fix 310 error message 2021-10-06 13:59:05 +01:00
Will McGugan
3da0e79e3c added skips 2021-10-06 13:55:11 +01:00
Will McGugan
2aa932cf58 fix broken test on py310 2021-10-06 13:51:26 +01:00
Will McGugan
f934b09ecb test fake attributes 2021-09-18 09:43:09 +01:00
Will McGugan
1af5eee96f pretty docs 2021-06-09 15:39:58 +01:00
Will McGugan
410a06e18f added types to pretty printer 2021-05-12 15:31:19 +01:00
Will McGugan
f0b16ba2c2 allow repr to be a callable 2021-05-07 17:47:03 +01:00
Will McGugan
6bd5b815b8 import test fix 2021-05-07 15:59:22 +01:00
Will McGugan
1b0e4c6fe9 skip test on py36 2021-05-07 14:57:33 +01:00
Will McGugan
da4737a999 typing and black 2021-05-07 14:47:38 +01:00
Will McGugan
1f0491ed17 tests for pretty attrs 2021-05-07 14:43:30 +01:00
Will McGugan
cbbc490d2b rename dataclass in test 2021-03-06 14:25:23 +00:00
Will McGugan
a05ff5f942 pretty printable dataclasses 2021-03-06 14:14:06 +00:00
Will McGugan
becaaaed56 black 2021-02-20 11:55:45 +00:00
Will McGugan
a49e595996 fixes 2021-02-20 11:05:21 +00:00
Will McGugan
7199b6fb3b selectively insert new line in iPython 2020-12-29 18:21:26 +00:00
Will McGugan
e17e1d5bdb black 2020-11-27 20:06:59 +00:00
Will McGugan
0138b18950 fix tuple of one issue 2020-11-27 20:04:53 +00:00
Will McGugan
8421f69695 black 2020-11-03 09:53:18 +00:00
Will McGugan
637d3d0a85 max_lines 2020-10-30 17:32:36 +00:00
Will McGugan
70d4b19af5 added container abbreviation to pretty print 2020-10-23 16:44:49 +01:00