From 0643a8418154ad5e56a2575d26b9e2722c3f78fd Mon Sep 17 00:00:00 2001 From: Emilio Graff <1@emil.io> Date: Tue, 30 May 2023 09:21:06 -0700 Subject: [PATCH] Do not trigger backend auto-resolution --- matplotlib_inline/backend_inline.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matplotlib_inline/backend_inline.py b/matplotlib_inline/backend_inline.py index 6bcc1d4..b7e1df8 100644 --- a/matplotlib_inline/backend_inline.py +++ b/matplotlib_inline/backend_inline.py @@ -208,9 +208,9 @@ def configure_inline_support(shell, backend): def _enable_matplotlib_integration(): """Enable extra IPython matplotlib integration when we are loaded as the matplotlib backend.""" - from matplotlib import get_backend + from matplotlib import _get_backend_or_none ip = get_ipython() - backend = get_backend() + backend = _get_backend_or_none() if ip and backend == 'module://%s' % __name__: from IPython.core.pylabtools import activate_matplotlib try: