FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[pull] main from ipython:main by pull[bot] · Pull Request #11 · sysfce2/python-matplotlib-inline · GitHub

Merged
26 changes: 19 additions & 7 deletions .github/workflows/main.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ 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.14", "3.14t"]
include:
#- os: macos-latest
# python-version: "3.14"
- os: windows-latest
python-version: "3.14"

steps:
- name: Checkout
Expand All @@ -36,22 +41,29 @@ 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
if: ${{ matrix.python-version == '3.14' }}
run: flake8 matplotlib_inline --ignore=E501,W504,W503

- name: Install ruff
run: mamba 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 .
2 changes: 1 addition & 1 deletion matplotlib_inline/__init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from . import backend_inline, config # noqa

__version__ = "0.1.7"
__version__ = "0.2.0"

# we can't ''.join(...) otherwise finding the version number at build time requires
# import which introduces IPython and matplotlib at build time, and thus circular
Expand Down
15 changes: 7 additions & 8 deletions matplotlib_inline/backend_inline.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -101,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():
Expand Down
2 changes: 1 addition & 1 deletion matplotlib_inline/config.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Empty file.
14 changes: 14 additions & 0 deletions pyproject.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,17 @@ filterwarnings = ["error"]
testpaths = [
"tests",
]

[tool.mypy]
strict=false
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
]
Loading

Back | FazBrowse Home | New Git URL