Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 20, 2025
1 parent 0ee2b3e commit 9c16999
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
9 changes: 3 additions & 6 deletions sunkit_pyvista/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions sunkit_pyvista/plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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,
)
Expand Down
2 changes: 1 addition & 1 deletion sunkit_pyvista/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 9c16999

Please sign in to comment.