diff options
author | robot-contrib <robot-contrib@yandex-team.ru> | 2022-05-18 00:43:36 +0300 |
---|---|---|
committer | robot-contrib <robot-contrib@yandex-team.ru> | 2022-05-18 00:43:36 +0300 |
commit | 9e5f436a8b2a27bcc7802e443ea3ef3e41a82a75 (patch) | |
tree | 78b522cab9f76336e62064d4d8ff7c897659b20e /contrib/python/ipython/py3/IPython/core/pylabtools.py | |
parent | 8113a823ffca6451bb5ff8f0334560885a939a24 (diff) | |
download | ydb-9e5f436a8b2a27bcc7802e443ea3ef3e41a82a75.tar.gz |
Update contrib/python/ipython/py3 to 8.3.0
ref:e84342d4d30476f9148137f37fd0c6405fd36f55
Diffstat (limited to 'contrib/python/ipython/py3/IPython/core/pylabtools.py')
-rw-r--r-- | contrib/python/ipython/py3/IPython/core/pylabtools.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/contrib/python/ipython/py3/IPython/core/pylabtools.py b/contrib/python/ipython/py3/IPython/core/pylabtools.py index c9c8e14aa2..68e100f7d0 100644 --- a/contrib/python/ipython/py3/IPython/core/pylabtools.py +++ b/contrib/python/ipython/py3/IPython/core/pylabtools.py @@ -185,8 +185,8 @@ def mpl_runner(safe_execfile): Parameters ---------- safe_execfile : function - This must be a function with the same interface as the - :meth:`safe_execfile` method of IPython. + This must be a function with the same interface as the + :meth:`safe_execfile` method of IPython. Returns ------- @@ -231,8 +231,8 @@ def _reshow_nbagg_figure(fig): """reshow an nbagg figure""" try: reshow = fig.canvas.manager.reshow - except AttributeError: - raise NotImplementedError() + except AttributeError as e: + raise NotImplementedError() from e else: reshow() @@ -241,7 +241,7 @@ def select_figure_formats(shell, formats, **kwargs): """Select figure formats for the inline backend. Parameters - ========== + ---------- shell : InteractiveShell The main IPython instance. formats : str or set @@ -391,7 +391,7 @@ def import_pylab(user_ns, import_all=True): # IPython symbols to add user_ns['figsize'] = figsize - from IPython.core.display import display + from IPython.display import display # Add display and getfigs to the user's namespace user_ns['display'] = display user_ns['getfigs'] = getfigs @@ -408,7 +408,6 @@ def configure_inline_support(shell, backend): Parameters ---------- shell : InteractiveShell instance - backend : matplotlib backend """ warnings.warn( @@ -418,6 +417,8 @@ def configure_inline_support(shell, backend): stacklevel=2, ) - from matplotlib_inline.backend_inline import configure_inline_support as configure_inline_support_orig + from matplotlib_inline.backend_inline import ( + configure_inline_support as configure_inline_support_orig, + ) configure_inline_support_orig(shell, backend) |