Skip to content

Commit 15777a5

Browse files
authored
Merge branch 'main' into add_test
2 parents 73422c2 + 4af2f45 commit 15777a5

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

matplotlib_inline/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
from . import backend_inline, config # noqa
2-
__version__ = "0.1.6" # noqa
2+
__version__ = "0.1.7.dev1" # noqa

matplotlib_inline/backend_inline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def configure_inline_support(shell, backend):
176176
if cfg not in shell.configurables:
177177
shell.configurables.append(cfg)
178178

179-
if backend == 'module://matplotlib_inline.backend_inline':
179+
if backend in ('inline', 'module://matplotlib_inline.backend_inline'):
180180
shell.events.register('post_execute', flush_figures)
181181

182182
# Save rcParams that will be overwrittern
@@ -211,7 +211,7 @@ def _enable_matplotlib_integration():
211211
from matplotlib import get_backend
212212
ip = get_ipython()
213213
backend = get_backend()
214-
if ip and backend == 'module://%s' % __name__:
214+
if ip and backend in ('inline', 'module://matplotlib_inline.backend_inline'):
215215
from IPython.core.pylabtools import activate_matplotlib
216216
try:
217217
activate_matplotlib(backend)

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ test = [
4949
"pytest",
5050
]
5151

52+
[project.entry-points."matplotlib.backend"]
53+
inline = "matplotlib_inline.backend_inline"
54+
5255
[project.urls]
5356
Homepage = "https://github.com/ipython/matplotlib-inline"
5457

0 commit comments

Comments
 (0)