From c74888971d1e07991ace4d7f7cd55c4cfb653153 Mon Sep 17 00:00:00 2001 From: M Bussonnier Date: Sat, 4 Oct 2025 11:13:29 +0200 Subject: [PATCH 01/12] test on 3.14-dev --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 942166b..e31f51a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,7 +22,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.13t"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.13t", "3.14-dev"] steps: - name: Checkout From 9cc20d30d239ee649ddf3fd4c9fcd50984865299 Mon Sep 17 00:00:00 2001 From: M Bussonnier Date: Wed, 8 Oct 2025 10:49:57 +0200 Subject: [PATCH 02/12] remove nbdime for now --- .github/workflows/main.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e31f51a..800fa63 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -36,12 +36,7 @@ jobs: - name: Install package with test dependencies run: pip install .[test] - - name: Test installation with nbdime - if: ${{ matrix.python-version != '3.9' }} - run: pytest -v --nbdime - - name: Test installation without nbdime - if: ${{ matrix.python-version == '3.9' }} run: pytest -v - name: Test flake8 From 95431ddb0e6f7923e5379f565edbb591854e5f4b Mon Sep 17 00:00:00 2001 From: M Bussonnier Date: Thu, 16 Oct 2025 14:36:40 +0200 Subject: [PATCH 03/12] dont use mamba --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 800fa63..fe3561a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,7 +43,7 @@ jobs: run: flake8 matplotlib_inline --ignore=E501,W504,W503 - name: Install ruff - run: mamba install ruff + run: pip install ruff - name: Check code with ruff run: ruff check matplotlib_inline From b095b3ddc805f2d38bf5c7ab50bde6f33ada59ef Mon Sep 17 00:00:00 2001 From: M Bussonnier Date: Thu, 16 Oct 2025 14:40:39 +0200 Subject: [PATCH 04/12] mypy and ruff config --- pyproject.toml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index ebbbea4..0b0eaf0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,3 +72,17 @@ filterwarnings = ["error"] testpaths = [ "tests", ] + +[tool.mypy] +strict=true +warn_unreachable=true +enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"] + +[tool.ruff] + +[tool.ruff.lint] +extend-select = [ + "UP", # pyupgrade + "I", # isort + "B", # flake8-bugbear +] From e3d3c5631fa01fc60dbdda24fb4a0238a99f0bfc Mon Sep 17 00:00:00 2001 From: M Bussonnier Date: Thu, 16 Oct 2025 14:41:03 +0200 Subject: [PATCH 05/12] add py.typed --- matplotlib_inline/py.typed | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 matplotlib_inline/py.typed diff --git a/matplotlib_inline/py.typed b/matplotlib_inline/py.typed new file mode 100644 index 0000000..e69de29 From 3ee6c3a39b69b140be23d496af6cb615f9cf867e Mon Sep 17 00:00:00 2001 From: M Bussonnier Date: Thu, 16 Oct 2025 14:41:31 +0200 Subject: [PATCH 06/12] fix ruff --- matplotlib_inline/backend_inline.py | 11 +++++------ matplotlib_inline/config.py | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/matplotlib_inline/backend_inline.py b/matplotlib_inline/backend_inline.py index e5018ce..9b2febf 100644 --- a/matplotlib_inline/backend_inline.py +++ b/matplotlib_inline/backend_inline.py @@ -4,17 +4,16 @@ # Distributed under the terms of the BSD 3-Clause License. import matplotlib +from IPython.core.getipython import get_ipython +from IPython.core.interactiveshell import InteractiveShell +from IPython.core.pylabtools import select_figure_formats +from IPython.display import display from matplotlib import colors +from matplotlib._pylab_helpers import Gcf from matplotlib.backends import backend_agg from matplotlib.backends.backend_agg import FigureCanvasAgg -from matplotlib._pylab_helpers import Gcf from matplotlib.figure import Figure -from IPython.core.interactiveshell import InteractiveShell -from IPython.core.getipython import get_ipython -from IPython.core.pylabtools import select_figure_formats -from IPython.display import display - from .config import InlineBackend diff --git a/matplotlib_inline/config.py b/matplotlib_inline/config.py index c09cdb2..0838040 100644 --- a/matplotlib_inline/config.py +++ b/matplotlib_inline/config.py @@ -6,8 +6,8 @@ # Copyright (c) IPython Development Team. # Distributed under the terms of the BSD 3-Clause License. +from traitlets import Bool, Dict, Instance, Set, TraitError, Unicode from traitlets.config.configurable import SingletonConfigurable -from traitlets import Dict, Instance, Set, Bool, TraitError, Unicode # Configurable for inline backend options From 497e259ce62d945e982c302cb245ba9832007c22 Mon Sep 17 00:00:00 2001 From: M Bussonnier Date: Thu, 16 Oct 2025 14:45:47 +0200 Subject: [PATCH 07/12] bump to 3.14t --- .github/workflows/main.yml | 10 ++++++++-- matplotlib_inline/backend_inline.py | 4 ++-- pyproject.toml | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fe3561a..a26540c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,7 +22,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.13t", "3.14-dev"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"] steps: - name: Checkout @@ -43,10 +43,16 @@ jobs: run: flake8 matplotlib_inline --ignore=E501,W504,W503 - name: Install ruff - run: pip install ruff + run: pip install ruff - name: Check code with ruff run: ruff check matplotlib_inline - name: Check formatting with ruff run: ruff format matplotlib_inline --check + + - name: install Mypy + run : pip install mypy matpltolib + + - name: run mypy + run: mypy . diff --git a/matplotlib_inline/backend_inline.py b/matplotlib_inline/backend_inline.py index 9b2febf..0a757b5 100644 --- a/matplotlib_inline/backend_inline.py +++ b/matplotlib_inline/backend_inline.py @@ -100,9 +100,9 @@ def show(close=None, block=None): # This flag will be reset by draw_if_interactive when called -show._draw_called = False +show._draw_called = False # type: ignore[attr-defined] # list of figures to draw when flush_figures is called -show._to_draw = [] +show._to_draw = [] # type: ignore[attr-defined] def flush_figures(): diff --git a/pyproject.toml b/pyproject.toml index 0b0eaf0..1b145c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,7 +74,7 @@ testpaths = [ ] [tool.mypy] -strict=true +strict=false warn_unreachable=true enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"] From 536f14e1630d47d445efbf34a5a08f34709d66dd Mon Sep 17 00:00:00 2001 From: M Bussonnier Date: Thu, 16 Oct 2025 14:47:43 +0200 Subject: [PATCH 08/12] typo --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a26540c..4b0d705 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -52,7 +52,7 @@ jobs: run: ruff format matplotlib_inline --check - name: install Mypy - run : pip install mypy matpltolib + run : pip install mypy matplotlib - name: run mypy run: mypy . From 25f37600dea238f3502d21335f48fee4f75864b0 Mon Sep 17 00:00:00 2001 From: M Bussonnier Date: Thu, 16 Oct 2025 14:49:23 +0200 Subject: [PATCH 09/12] add osx and windows testing --- .github/workflows/main.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4b0d705..4432a87 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,6 +23,11 @@ jobs: matrix: os: [ubuntu-latest] python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"] + include: + - os: osx-latest + python-version: "3.14" + - os: windows-latest + python-version: "3.14" steps: - name: Checkout From dc8260e6e05cd739e3f9149006a2901b5c693ed7 Mon Sep 17 00:00:00 2001 From: M Bussonnier Date: Thu, 16 Oct 2025 14:50:17 +0200 Subject: [PATCH 10/12] run lints on 3.14 only --- .github/workflows/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4432a87..b63584d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -45,19 +45,25 @@ jobs: run: pytest -v - name: Test flake8 + if: ${{ matrix.python-version == '3.14' }} run: flake8 matplotlib_inline --ignore=E501,W504,W503 - name: Install ruff + if: ${{ matrix.python-version == '3.14' }} run: pip install ruff - name: Check code with ruff + if: ${{ matrix.python-version == '3.14' }} run: ruff check matplotlib_inline - name: Check formatting with ruff + if: ${{ matrix.python-version == '3.14' }} run: ruff format matplotlib_inline --check - name: install Mypy + if: ${{ matrix.python-version == '3.14' }} run : pip install mypy matplotlib - name: run mypy + if: ${{ matrix.python-version == '3.14' }} run: mypy . From 6b3fb809b467f40209ab211a128332be712a3c3f Mon Sep 17 00:00:00 2001 From: M Bussonnier Date: Thu, 16 Oct 2025 14:54:49 +0200 Subject: [PATCH 11/12] rename macos --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b63584d..b1fe0fc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ jobs: os: [ubuntu-latest] python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"] include: - - os: osx-latest + - os: macos-latest python-version: "3.14" - os: windows-latest python-version: "3.14" From 488b6fd98bedaa4fa7ba395f38ddd7496ffd25c8 Mon Sep 17 00:00:00 2001 From: M Bussonnier Date: Thu, 16 Oct 2025 15:00:38 +0200 Subject: [PATCH 12/12] comment macos --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b1fe0fc..84097ce 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,8 +24,8 @@ jobs: os: [ubuntu-latest] python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"] include: - - os: macos-latest - python-version: "3.14" + #- os: macos-latest + # python-version: "3.14" - os: windows-latest python-version: "3.14"