From 433d874eecf56cf0e2818fbef985aa589a623376 Mon Sep 17 00:00:00 2001 From: Ian Thomas Date: Tue, 12 Mar 2024 11:26:14 +0000 Subject: [PATCH] Add matplotlib.backend entry point --- matplotlib_inline/__init__.py | 2 +- matplotlib_inline/backend_inline.py | 2 +- pyproject.toml | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/matplotlib_inline/__init__.py b/matplotlib_inline/__init__.py index f7ef1dd..2ea2bb1 100644 --- a/matplotlib_inline/__init__.py +++ b/matplotlib_inline/__init__.py @@ -1,2 +1,2 @@ from . import backend_inline, config # noqa -__version__ = "0.1.6" # noqa +__version__ = "0.1.7.dev1" # noqa diff --git a/matplotlib_inline/backend_inline.py b/matplotlib_inline/backend_inline.py index 6bcc1d4..4b17d36 100644 --- a/matplotlib_inline/backend_inline.py +++ b/matplotlib_inline/backend_inline.py @@ -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 diff --git a/pyproject.toml b/pyproject.toml index b7ec7bd..362e3f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"