From bfeb3c5f25d229adec9949adb4cbdc3c615ba518 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 20:20:57 +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/astral-sh/ruff-pre-commit: v0.6.9 → v0.9.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.9...v0.9.1) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e2b2d6ca..383b02fd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -54,7 +54,7 @@ repos: exclude: ".*.asdf" - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.9 + rev: v0.9.1 hooks: - id: ruff args: ["--fix", "--show-fixes"] From e4e9935aa68a3db3ef2cb6437d9ad7fc7820abcb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 20:21:04 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- gwcs/converters/selector.py | 3 +-- gwcs/converters/spectroscopy.py | 2 +- gwcs/wcs.py | 10 ++-------- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/gwcs/converters/selector.py b/gwcs/converters/selector.py index c6603b46..b495af5c 100644 --- a/gwcs/converters/selector.py +++ b/gwcs/converters/selector.py @@ -34,8 +34,7 @@ def from_yaml_tree_transform(self, node, tag, ctx): inputs_mapping, models.Mapping ): msg = ( - "inputs_mapping must be an instance" - "of astropy.modeling.models.Mapping." + "inputs_mapping must be an instanceof astropy.modeling.models.Mapping." ) raise TypeError(msg) mapper = node["mapper"] diff --git a/gwcs/converters/spectroscopy.py b/gwcs/converters/spectroscopy.py index b5ef9f1e..3e5e2583 100644 --- a/gwcs/converters/spectroscopy.py +++ b/gwcs/converters/spectroscopy.py @@ -102,7 +102,7 @@ def from_yaml_tree_transform(self, node, tag, ctx): groove_density=groove_density, spectral_order=order ) else: - msg = "Can't create a GratingEquation model with " f"output {output}" + msg = f"Can't create a GratingEquation model with output {output}" raise ValueError(msg) return model diff --git a/gwcs/wcs.py b/gwcs/wcs.py index 6d452a35..5c7bd7cd 100644 --- a/gwcs/wcs.py +++ b/gwcs/wcs.py @@ -1998,10 +1998,7 @@ def _to_fits_sip( input_axes = sorted(set(input_axes)) if len(input_axes) != 2: - msg = ( - "Only CelestialFrame that correspond to two " - "input axes are supported." - ) + msg = "Only CelestialFrame that correspond to two input axes are supported." raise ValueError(msg) # Axis number for FITS axes. @@ -2407,10 +2404,7 @@ def find_frame(axis_number): or max(input_axes) + 1 != n_inputs or min(input_axes) < 0 ): - msg = ( - "Input axes indices are inconsistent with the " - "forward transformation." - ) + msg = "Input axes indices are inconsistent with the forward transformation." raise ValueError(msg) if detect_celestial: