diff options
| author | Alexander Smirnov <[email protected]> | 2024-03-13 10:33:47 +0000 |
|---|---|---|
| committer | Alexander Smirnov <[email protected]> | 2024-03-13 10:33:47 +0000 |
| commit | 1df54be5538361db7f33afc618d1597272414294 (patch) | |
| tree | bb39e4b75db0b0a9722468eacef91ffd1388eb8d /contrib/python/ipython/py3/IPython/lib | |
| parent | 7a673cf01feefbe95bf5e7396d9179a5f283aeba (diff) | |
| parent | 01aef806626b16e9817e07f718f10e151f52e400 (diff) | |
Merge branch 'rightlib' into mergelibs-240313-1032
Diffstat (limited to 'contrib/python/ipython/py3/IPython/lib')
| -rw-r--r-- | contrib/python/ipython/py3/IPython/lib/pretty.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/python/ipython/py3/IPython/lib/pretty.py b/contrib/python/ipython/py3/IPython/lib/pretty.py index 2575c3b0a94..631445b24e3 100644 --- a/contrib/python/ipython/py3/IPython/lib/pretty.py +++ b/contrib/python/ipython/py3/IPython/lib/pretty.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Python advanced pretty printer. This pretty printer is intended to replace the old `pprint` python module which does not allow developers @@ -108,6 +107,8 @@ from warnings import warn from IPython.utils.decorators import undoc from IPython.utils.py3compat import PYPY +from typing import Dict + __all__ = ['pretty', 'pprint', 'PrettyPrinter', 'RepresentationPrinter', 'for_type', 'for_type_by_name', 'RawText', 'RawStringLiteral', 'CallExpression'] @@ -807,6 +808,7 @@ def _exception_pprint(obj, p, cycle): #: the exception base +_exception_base: type try: _exception_base = BaseException except NameError: @@ -848,8 +850,8 @@ _type_pprinters[range] = _repr_pprint _type_pprinters[bytes] = _repr_pprint #: printers for types specified by name -_deferred_type_pprinters = { -} +_deferred_type_pprinters: Dict = {} + def for_type(typ, func): """ |
