diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2024-03-12 17:24:47 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2024-03-12 17:34:45 +0300 |
commit | e84602b8f2b95d10d45eb11369ae7d627339c881 (patch) | |
tree | 028524c9f076a9c4019a8d78d4a30685b7626c99 /contrib/python/ipython/py3/IPython/lib/pretty.py | |
parent | e98c636d759bf6f106a2b90142041bb9d4f1e33f (diff) | |
download | ydb-e84602b8f2b95d10d45eb11369ae7d627339c881.tar.gz |
Intermediate changes
Diffstat (limited to 'contrib/python/ipython/py3/IPython/lib/pretty.py')
-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 2575c3b0a9..631445b24e 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): """ |