From 0ee2b3e9ae7369e8e82d2da427e3d522e3c86b6b Mon Sep 17 00:00:00 2001 From: Cadair <1391051+Cadair@users.noreply.github.com> Date: Mon, 20 Jan 2025 07:03:48 +0000 Subject: [PATCH 1/2] Automatic package template update --- .cruft.json | 4 ++-- .pre-commit-config.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.cruft.json b/.cruft.json index ba868a0..aea6d30 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/sunpy/package-template", - "commit": "d6b86e07efa31959f43e99ba32d323cf76736a05", + "commit": "ff0522bc171a1fc63022ed2a371f70669173012e", "checkout": null, "context": { "cookiecutter": { @@ -32,7 +32,7 @@ ".github/workflows/sub_package_update.yml" ], "_template": "https://github.com/sunpy/package-template", - "_commit": "d6b86e07efa31959f43e99ba32d323cf76736a05" + "_commit": "ff0522bc171a1fc63022ed2a371f70669173012e" } }, "directory": null diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 57f62ad..b0957b8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: # This should be before any formatting hooks like isort - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.8.6" + rev: "v0.9.1" hooks: - id: ruff args: ["--fix", "--unsafe-fixes"] From 9c16999ecec80b373ac911e12ab6a7fa1f16eb56 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 07:38:58 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- sunkit_pyvista/conftest.py | 9 +++------ sunkit_pyvista/plotter.py | 4 ++-- sunkit_pyvista/version.py | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/sunkit_pyvista/conftest.py b/sunkit_pyvista/conftest.py index 8fcbeda..e69f666 100644 --- a/sunkit_pyvista/conftest.py +++ b/sunkit_pyvista/conftest.py @@ -64,10 +64,7 @@ def verify_cache_images(plotter): allowed_warning = IMAGE_REGRESSION_WARNING if test_name is None: - msg = ( - "Unable to identify calling test function. This function " - "should only be used within a pytest environment." - ) + msg = "Unable to identify calling test function. This function should only be used within a pytest environment." raise RuntimeError( msg, ) @@ -83,13 +80,13 @@ def verify_cache_images(plotter): error = pyvista.compare_images(str(image_filename), plotter) if error > allowed_error: - msg = "Exceeded image regression error of " f"{IMAGE_REGRESSION_ERROR} with an image error of " f"{error}" + msg = f"Exceeded image regression error of {IMAGE_REGRESSION_ERROR} with an image error of {error}" raise RuntimeError( msg, ) if error > allowed_warning: warnings.warn( - "Exceeded image regression warning of " f"{IMAGE_REGRESSION_WARNING} with an image error of " f"{error}", + f"Exceeded image regression warning of {IMAGE_REGRESSION_WARNING} with an image error of {error}", stacklevel=2, ) return None diff --git a/sunkit_pyvista/plotter.py b/sunkit_pyvista/plotter.py index a1faa10..8601512 100644 --- a/sunkit_pyvista/plotter.py +++ b/sunkit_pyvista/plotter.py @@ -182,7 +182,7 @@ def set_view_angle(self, angle: u.deg): """ view_angle = angle.to_value(u.deg) if not (view_angle > 0 and view_angle <= 180): - msg = "specified view angle must be " "0 deg < angle <= 180 deg" + msg = "specified view angle must be 0 deg < angle <= 180 deg" raise ValueError(msg) zoom_value = self.camera.view_angle / view_angle self.camera.zoom(zoom_value) @@ -290,7 +290,7 @@ def plot_map( clip_interval=clip_interval, ) else: - msg = "Clip percentile interval must be " "specified as two numbers." + msg = "Clip percentile interval must be specified as two numbers." raise ValueError( msg, ) diff --git a/sunkit_pyvista/version.py b/sunkit_pyvista/version.py index 523a97a..d068bdd 100644 --- a/sunkit_pyvista/version.py +++ b/sunkit_pyvista/version.py @@ -9,7 +9,7 @@ except Exception: import warnings - warnings.warn(f'could not determine {__name__.split(".")[0]} package version; this indicates a broken installation') + warnings.warn(f"could not determine {__name__.split('.')[0]} package version; this indicates a broken installation") del warnings version = "0.0.0"