diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cf65c4a..a16ad25 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: v6.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.1.0 hooks: - id: isort - - repo: https://github.com/psf/black - rev: 22.6.0 + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 25.9.0 hooks: - id: black - repo: https://github.com/asottile/pyupgrade - rev: v2.19.0 + rev: v3.20.0 hooks: - id: pyupgrade args: [--py37-plus] 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