From c1b6f2632c97829a6d700ae6934ed06a2676de1c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 17:52:15 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.0.1 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.0.1...v5.0.0) - [github.com/asottile/setup-cfg-fmt: v1.17.0 → v2.8.0](https://github.com/asottile/setup-cfg-fmt/compare/v1.17.0...v2.8.0) - [github.com/PyCQA/flake8: 4.0.1 → 7.3.0](https://github.com/PyCQA/flake8/compare/4.0.1...7.3.0) - https://github.com/myint/autoflake → https://github.com/PyCQA/autoflake - [github.com/PyCQA/autoflake: v1.4 → v2.3.1](https://github.com/PyCQA/autoflake/compare/v1.4...v2.3.1) - [github.com/PyCQA/isort: 5.8.0 → 6.0.1](https://github.com/PyCQA/isort/compare/5.8.0...6.0.1) - [github.com/psf/black: 22.6.0 → 25.1.0](https://github.com/psf/black/compare/22.6.0...25.1.0) - [github.com/asottile/pyupgrade: v2.19.0 → v3.20.0](https://github.com/asottile/pyupgrade/compare/v2.19.0...v3.20.0) --- .pre-commit-config.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cf65c4a..6490626 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ ci: autoupdate_schedule: 'quarterly' repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.0.1 + rev: v5.0.0 hooks: - id: check-docstring-first - id: end-of-file-fixer @@ -10,28 +10,28 @@ repos: - id: mixed-line-ending - id: check-merge-conflict - repo: https://github.com/asottile/setup-cfg-fmt - rev: v1.17.0 + rev: v2.8.0 hooks: - id: setup-cfg-fmt - repo: https://github.com/PyCQA/flake8 - rev: 4.0.1 + rev: 7.3.0 hooks: - id: flake8 - - repo: https://github.com/myint/autoflake - rev: v1.4 + - repo: https://github.com/PyCQA/autoflake + rev: v2.3.1 hooks: - id: autoflake args: ["--in-place", "--remove-all-unused-imports", "--ignore-init-module-imports", "--remove-unused-variables"] - repo: https://github.com/PyCQA/isort - rev: 5.8.0 + rev: 6.0.1 hooks: - id: isort - repo: https://github.com/psf/black - rev: 22.6.0 + rev: 25.1.0 hooks: - id: black - repo: https://github.com/asottile/pyupgrade - rev: v2.19.0 + rev: v3.20.0 hooks: - id: pyupgrade args: [--py37-plus] From c7df033934100d47b1e43c227df1d5e35eb558ce Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 17:52:56 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- examples/_gen_images.py | 1 + examples/dynamic.py | 1 + examples/multifig.py | 1 + examples/static.py | 1 + mpl_playback/playback.py | 2 +- mpl_playback/scraper.py | 1 + setup.cfg | 11 ++++------- 7 files changed, 10 insertions(+), 8 deletions(-) diff --git a/examples/_gen_images.py b/examples/_gen_images.py index 2883119..9cd2cf6 100644 --- a/examples/_gen_images.py +++ b/examples/_gen_images.py @@ -1,6 +1,7 @@ """ garbo """ + from mpl_playback.record import record_file # record_file("dynamic.py", "fig") diff --git a/examples/dynamic.py b/examples/dynamic.py index 95511db..7e98f43 100644 --- a/examples/dynamic.py +++ b/examples/dynamic.py @@ -7,6 +7,7 @@ so the ``mpl_playback`` sphinx-gallery scraper will be used to generate a gif to embed in the gallery. Contrast this with :doc:`/gallery/static` """ + import matplotlib.pyplot as plt import numpy as np from matplotlib.widgets import Button, Slider diff --git a/examples/multifig.py b/examples/multifig.py index dc68b52..6130f21 100644 --- a/examples/multifig.py +++ b/examples/multifig.py @@ -9,6 +9,7 @@ ``record_file("multifig.py", ["slider_fig", "fig"])`` """ + import matplotlib.pyplot as plt import numpy as np from matplotlib.widgets import Slider diff --git a/examples/static.py b/examples/static.py index ce77f62..22de172 100644 --- a/examples/static.py +++ b/examples/static.py @@ -7,6 +7,7 @@ does not have an associated playback file, so the scraper falls back to the sphinx-gallery matplotlib scraper. """ + import matplotlib.pyplot as plt import numpy as np from matplotlib.widgets import Button, Slider diff --git a/mpl_playback/playback.py b/mpl_playback/playback.py index 3db4a2e..ce08c98 100644 --- a/mpl_playback/playback.py +++ b/mpl_playback/playback.py @@ -1,10 +1,10 @@ from __future__ import annotations import json +from contextlib import contextmanager from pathlib import Path from typing import Literal from unittest import mock -from contextlib import contextmanager import matplotlib import numpy as np diff --git a/mpl_playback/scraper.py b/mpl_playback/scraper.py index 8f763b4..2646213 100644 --- a/mpl_playback/scraper.py +++ b/mpl_playback/scraper.py @@ -2,6 +2,7 @@ file heavily based on/taken from the sphinx-gallery version https://github.com/sphinx-gallery/sphinx-gallery/blob/ecd399e2e60557875d9312a6f5f8dbe4d0dd7a0e/sphinx_gallery/scrapers.py """ + from pathlib import Path from warnings import filterwarnings diff --git a/setup.cfg b/setup.cfg index 185f5c1..50dae85 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,18 +7,15 @@ url = https://github.com/ianhi/mpl-playback author = Ian Hunt-Isaak author_email = ianhuntisaak@gmail.com license = BSD-3-Clause -license_file = LICENSE/LICENSE +license_files = LICENSE/LICENSE classifiers = Framework :: Matplotlib Intended Audience :: Developers Intended Audience :: Science/Research - License :: OSI Approved :: BSD License Operating System :: OS Independent Programming Language :: Python Programming Language :: Python :: 3 Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 download_url = https://github.com/ianhi/mpl-playback keywords = matplotlib, gif project_urls = @@ -29,15 +26,15 @@ project_urls = packages = find: install_requires = matplotlib>=3.3 -python_requires = >=3.8 +python_requires = >=3.9 [options.extras_require] docs = Sphinx>=1.5 furo - myst_nb + myst-nb sphinx-copybutton - sphinx_gallery + sphinx-gallery [options.package_data] * = *.pyi, py.typed