Skip to content

Commit

Permalink
Add matplotlib.backend entry point
Browse files Browse the repository at this point in the history
  • Loading branch information
ianthomas23 authored and SylvainCorlay committed Mar 12, 2024
1 parent 876fe60 commit c5887ea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion matplotlib_inline/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
from . import backend_inline, config # noqa
__version__ = "0.1.6" # noqa
__version__ = "0.1.7.dev1" # noqa
2 changes: 1 addition & 1 deletion matplotlib_inline/backend_inline.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def configure_inline_support(shell, backend):
if cfg not in shell.configurables:
shell.configurables.append(cfg)

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

# Save rcParams that will be overwrittern
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ license = {file = "LICENSE"}
readme = "README.md"
requires-python = ">=3.8"

[project.entry-points."matplotlib.backend"]
inline = "matplotlib_inline.backend_inline"

[project.urls]
Homepage = "https://github.com/ipython/matplotlib-inline"

Expand Down

0 comments on commit c5887ea

Please sign in to comment.