summaryrefslogtreecommitdiffstats
path: root/contrib/python/ipython/py3/IPython/lib
diff options
context:
space:
mode:
authorAlexSm <[email protected]>2024-03-13 16:36:01 +0100
committerGitHub <[email protected]>2024-03-13 16:36:01 +0100
commit6cb1176da7acfe6571977f06e7d9dc4365cb330b (patch)
treec15fcf49a68ba829dc39eef237f94f41d0b55ee6 /contrib/python/ipython/py3/IPython/lib
parent67ba58b766f6ca63d5471aa18728e69d03ffe1ca (diff)
parent18c62b66fdaa3ae6c066f720f82b88b28cc3dc91 (diff)
Merge pull request #2697 from ydb-platform/mergelibs-240313-1032
Library import 240313-1032
Diffstat (limited to 'contrib/python/ipython/py3/IPython/lib')
-rw-r--r--contrib/python/ipython/py3/IPython/lib/pretty.py8
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):
"""