diff options
author | smosker <smosker@yandex-team.ru> | 2022-02-10 16:48:22 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:22 +0300 |
commit | 01fa2667d0e5e868b18424bc1906146e5ee340db (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /contrib/python/ipython/py2/IPython/core/displayhook.py | |
parent | dd14d17a747a9c259858faf2fcc3ea6b92df4e15 (diff) | |
download | ydb-01fa2667d0e5e868b18424bc1906146e5ee340db.tar.gz |
Restoring authorship annotation for <smosker@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/python/ipython/py2/IPython/core/displayhook.py')
-rw-r--r-- | contrib/python/ipython/py2/IPython/core/displayhook.py | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/contrib/python/ipython/py2/IPython/core/displayhook.py b/contrib/python/ipython/py2/IPython/core/displayhook.py index 50aaa7a50c..cce7c83d16 100644 --- a/contrib/python/ipython/py2/IPython/core/displayhook.py +++ b/contrib/python/ipython/py2/IPython/core/displayhook.py @@ -45,7 +45,7 @@ class DisplayHook(Configurable): self.do_full_cache = 0 cache_size = 0 warn('caching was disabled (min value for cache size is %s).' % - cache_size_min,stacklevel=3) + cache_size_min,stacklevel=3) else: self.do_full_cache = 1 @@ -293,17 +293,17 @@ class DisplayHook(Configurable): # IronPython blocks here forever if sys.platform != "cli": gc.collect() - - -class CapturingDisplayHook(object): - def __init__(self, shell, outputs=None): - self.shell = shell - if outputs is None: - outputs = [] - self.outputs = outputs - - def __call__(self, result=None): - if result is None: - return - format_dict, md_dict = self.shell.display_formatter.format(result) - self.outputs.append({ 'data': format_dict, 'metadata': md_dict }) + + +class CapturingDisplayHook(object): + def __init__(self, shell, outputs=None): + self.shell = shell + if outputs is None: + outputs = [] + self.outputs = outputs + + def __call__(self, result=None): + if result is None: + return + format_dict, md_dict = self.shell.display_formatter.format(result) + self.outputs.append({ 'data': format_dict, 'metadata': md_dict }) |