From cb466121210b7b8535a4fb816ccbe605f49b9373 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 18:03:08 +0000 Subject: [PATCH 1/2] chore: update pre-commit hooks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/commitizen-tools/commitizen: v3.21.3 → v4.1.0](https://github.com/commitizen-tools/commitizen/compare/v3.21.3...v4.1.0) - [github.com/scientific-python/cookie: 2024.03.10 → 2024.08.19](https://github.com/scientific-python/cookie/compare/2024.03.10...2024.08.19) - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v5.0.0) - [github.com/astral-sh/ruff-pre-commit: v0.3.5 → v0.8.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.3.5...v0.8.6) - [github.com/adamchainz/blacken-docs: 1.16.0 → 1.19.1](https://github.com/adamchainz/blacken-docs/compare/1.16.0...1.19.1) - [github.com/pre-commit/mirrors-mypy: v1.9.0 → v1.14.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.9.0...v1.14.1) - [github.com/codespell-project/codespell: v2.2.6 → v2.3.0](https://github.com/codespell-project/codespell/compare/v2.2.6...v2.3.0) - [github.com/abravalheri/validate-pyproject: v0.16 → v0.23](https://github.com/abravalheri/validate-pyproject/compare/v0.16...v0.23) --- .pre-commit-config.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 228a9e4..d91b16b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ ci: repos: - repo: https://github.com/commitizen-tools/commitizen - rev: v3.21.3 + rev: v4.1.0 hooks: - id: commitizen # - id: commitizen-branch @@ -15,12 +15,12 @@ repos: - id: check-useless-excludes - repo: https://github.com/scientific-python/cookie - rev: 2024.03.10 + rev: 2024.08.19 hooks: - id: sp-repo-review - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v5.0.0 hooks: - id: check-added-large-files - id: check-case-conflict @@ -48,7 +48,7 @@ repos: - id: text-unicode-replacement-char - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.3.5" + rev: "v0.8.6" hooks: # Run the linter - id: ruff @@ -59,7 +59,7 @@ repos: types_or: [python, pyi, jupyter] - repo: https://github.com/adamchainz/blacken-docs - rev: "1.16.0" + rev: "1.19.1" hooks: - id: blacken-docs additional_dependencies: [black==23.*] @@ -72,7 +72,7 @@ repos: args: [--prose-wrap=always] - repo: https://github.com/pre-commit/mirrors-mypy - rev: "v1.9.0" + rev: "v1.14.1" hooks: - id: mypy files: src @@ -80,11 +80,11 @@ repos: - pytest - repo: https://github.com/codespell-project/codespell - rev: "v2.2.6" + rev: "v2.3.0" hooks: - id: codespell - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.16 + rev: v0.23 hooks: - id: validate-pyproject From 2ef4352e14d4a0a7396729834aa4fdd1521be270 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 18:04:19 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/interpolated_coordinates/representation.py | 2 +- src/interpolated_coordinates/utils/generic_representation.py | 2 +- src/interpolated_coordinates/utils/spline.py | 4 ++-- tests/test_representation.py | 4 +--- tests/test_utils/test_generic_representation.py | 2 +- tests/test_utils/test_spline.py | 2 +- 6 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/interpolated_coordinates/representation.py b/src/interpolated_coordinates/representation.py index ce960c7..c875f60 100644 --- a/src/interpolated_coordinates/representation.py +++ b/src/interpolated_coordinates/representation.py @@ -4,9 +4,9 @@ __all__ = [ "InterpolatedBaseRepresentationOrDifferential", - "InterpolatedRepresentation", "InterpolatedCartesianRepresentation", "InterpolatedDifferential", + "InterpolatedRepresentation", ] import abc diff --git a/src/interpolated_coordinates/utils/generic_representation.py b/src/interpolated_coordinates/utils/generic_representation.py index 0ea0fd0..c139be8 100644 --- a/src/interpolated_coordinates/utils/generic_representation.py +++ b/src/interpolated_coordinates/utils/generic_representation.py @@ -50,8 +50,8 @@ from astropy.coordinates.representation import DIFFERENTIAL_CLASSES __all__ = [ - "GenericRepresentation", "GenericDifferential", + "GenericRepresentation", ] ############################################################################## diff --git a/src/interpolated_coordinates/utils/spline.py b/src/interpolated_coordinates/utils/spline.py index 740df57..4d5ed33 100644 --- a/src/interpolated_coordinates/utils/spline.py +++ b/src/interpolated_coordinates/utils/spline.py @@ -81,9 +81,9 @@ from __future__ import annotations __all__ = [ - "UnivariateSplinewithUnits", "InterpolatedUnivariateSplinewithUnits", "LSQUnivariateSplinewithUnits", + "UnivariateSplinewithUnits", ] import warnings @@ -335,7 +335,7 @@ def validate_input( # then validate with UnivariateSpline method, which works with units! out: tuple[ndarray, ndarray, ndarray, list[Quantity], int | str] out = super().validate_input(x, y, w, bbox, k, s, ext, check_finite) - return out # noqa: RET504 + return out @classmethod def _from_tck( diff --git a/tests/test_representation.py b/tests/test_representation.py index 3f8d48e..e18a9b3 100644 --- a/tests/test_representation.py +++ b/tests/test_representation.py @@ -2,9 +2,9 @@ __all__ = [ "Test_InterpolatedBaseRepresentationOrDifferential", - "Test_InterpolatedRepresentation", "Test_InterpolatedCartesianRepresentation", "Test_InterpolatedDifferential", + "Test_InterpolatedRepresentation", ] @@ -625,8 +625,6 @@ def test___truediv__(self, irep, affine) -> None: for c in expected.components: assert all(getattr(got, c) == getattr(expected, c)) - # - ##################################################################### diff --git a/tests/test_utils/test_generic_representation.py b/tests/test_utils/test_generic_representation.py index c870eeb..75e95e8 100644 --- a/tests/test_utils/test_generic_representation.py +++ b/tests/test_utils/test_generic_representation.py @@ -1,8 +1,8 @@ """Testing :mod:`~interpolated_coordinates.utils.generic_representation`.""" __all__ = [ - "test_GENERIC_REGISTRY", "Test_GenericRepresentation", + "test_GENERIC_REGISTRY", ] diff --git a/tests/test_utils/test_spline.py b/tests/test_utils/test_spline.py index aca71dc..3154827 100644 --- a/tests/test_utils/test_spline.py +++ b/tests/test_utils/test_spline.py @@ -1,9 +1,9 @@ """Testing :mod:`~interpolated_coordinates.utils.splines`.""" __all__ = [ - "Test_UnivariateSplinewithUnits", "Test_InterpolatedUnivariateSplinewithUnits", "Test_LSQUnivariateSplinewithUnits", + "Test_UnivariateSplinewithUnits", ] import astropy.units as u