From e03e9de4219029726d23565c91ef31941c748b8b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 4 May 2026 17:54:14 +0000 Subject: [PATCH 1/2] ci(pre-commit.ci): autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/compilerla/conventional-pre-commit: v2.1.1 → v4.4.0](https://github.com/compilerla/conventional-pre-commit/compare/v2.1.1...v4.4.0) - [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v6.0.0) - https://github.com/charliermarsh/ruff-pre-commit → https://github.com/astral-sh/ruff-pre-commit - [github.com/astral-sh/ruff-pre-commit: v0.0.256 → v0.15.12](https://github.com/astral-sh/ruff-pre-commit/compare/v0.0.256...v0.15.12) - https://github.com/psf/black → https://github.com/psf/black-pre-commit-mirror - [github.com/psf/black-pre-commit-mirror: 23.1.0 → 26.3.1](https://github.com/psf/black-pre-commit-mirror/compare/23.1.0...26.3.1) - [github.com/abravalheri/validate-pyproject: v0.12.1 → v0.25](https://github.com/abravalheri/validate-pyproject/compare/v0.12.1...v0.25) --- .pre-commit-config.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a22a04f..1537951 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,31 +7,31 @@ default_install_hook_types: [pre-commit, commit-msg] repos: - repo: https://github.com/compilerla/conventional-pre-commit - rev: v2.1.1 + rev: v4.4.0 hooks: - id: conventional-pre-commit stages: [commit-msg] - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v6.0.0 hooks: - id: check-docstring-first - id: end-of-file-fixer - id: trailing-whitespace - - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.256 + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.15.12 hooks: - id: ruff args: [--fix] - - repo: https://github.com/psf/black - rev: 23.1.0 + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 26.3.1 hooks: - id: black - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.12.1 + rev: v0.25 hooks: - id: validate-pyproject From 7b996ac210058db71fcf82e14fc7bbd968ca01d0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 4 May 2026 17:54:23 +0000 Subject: [PATCH 2/2] style(pre-commit.ci): auto fixes [...] --- docs/conf.py | 2 +- setup.py | 6 ++---- src/mpl_arrow/__init__.py | 1 + tests/test_mpl_arrow.py | 1 + 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 3358383..f2e77f3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -205,4 +205,4 @@ def linkcode_resolve(domain, info): fn = os.path.relpath(fn, start=os.path.dirname("../mpl_arrow")) - return f"https://github.com/mpl-extensions/mpl-arrow/blob/main/mpl_arrow/{fn}{linespec}" # noqa + return f"https://github.com/mpl-extensions/mpl-arrow/blob/main/mpl_arrow/{fn}{linespec}" diff --git a/setup.py b/setup.py index 25b184b..0715999 100644 --- a/setup.py +++ b/setup.py @@ -1,14 +1,12 @@ import sys -sys.stderr.write( - """ +sys.stderr.write(""" =============================== Unsupported installation method =============================== mpl-arrow does not support installation with `python setup.py install`. Please use `python -m pip install .` instead. -""" -) +""") sys.exit(1) diff --git a/src/mpl_arrow/__init__.py b/src/mpl_arrow/__init__.py index 8b28187..40aba4b 100644 --- a/src/mpl_arrow/__init__.py +++ b/src/mpl_arrow/__init__.py @@ -1,4 +1,5 @@ """Easily plot nice-looking arrows with matplotlib.""" + from importlib.metadata import PackageNotFoundError, version try: diff --git a/tests/test_mpl_arrow.py b/tests/test_mpl_arrow.py index 8272d71..d474407 100644 --- a/tests/test_mpl_arrow.py +++ b/tests/test_mpl_arrow.py @@ -1,5 +1,6 @@ import numpy as np from matplotlib import pyplot as plt + from mpl_arrow import arrow, arrow_absolute, vector