From 96b8100a95f51c7ea67bf7d824e4eba7aed56ca0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 6 Dec 2024 19:38:05 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- ndcube/__init__.py | 8 ++++---- ndcube/extra_coords/__init__.py | 9 +++++++-- ndcube/extra_coords/extra_coords.py | 2 +- ndcube/extra_coords/table_coord.py | 2 +- ndcube/tests/helpers.py | 8 ++++---- ndcube/utils/cube.py | 8 ++++++-- ndcube/utils/exceptions.py | 2 +- ndcube/utils/misc.py | 2 +- ndcube/utils/wcs.py | 25 +++++++++++++++++-------- ndcube/visualization/descriptor.py | 2 +- 10 files changed, 43 insertions(+), 25 deletions(-) diff --git a/ndcube/__init__.py b/ndcube/__init__.py index 7e52b7945..c137f5910 100644 --- a/ndcube/__init__.py +++ b/ndcube/__init__.py @@ -17,14 +17,14 @@ __all__ = [ - 'NDCube', - 'NDCubeSequence', - "NDCollection", "ExtraCoords", - "GlobalCoords", "ExtraCoordsABC", + "GlobalCoords", "GlobalCoordsABC", + "NDCollection", + 'NDCube', "NDCubeBase", + 'NDCubeSequence', "NDCubeSequenceBase", "__version__", ] diff --git a/ndcube/extra_coords/__init__.py b/ndcube/extra_coords/__init__.py index 315b95209..cdea39152 100644 --- a/ndcube/extra_coords/__init__.py +++ b/ndcube/extra_coords/__init__.py @@ -6,5 +6,10 @@ TimeTableCoordinate, ) -__all__ = ['TimeTableCoordinate', "MultipleTableCoordinate", - 'SkyCoordTableCoordinate', 'QuantityTableCoordinate', "BaseTableCoordinate"] +__all__ = [ + "BaseTableCoordinate", + "MultipleTableCoordinate", + 'QuantityTableCoordinate', + 'SkyCoordTableCoordinate', + 'TimeTableCoordinate', +] diff --git a/ndcube/extra_coords/extra_coords.py b/ndcube/extra_coords/extra_coords.py index 90ac72c83..ad3b42bb0 100644 --- a/ndcube/extra_coords/extra_coords.py +++ b/ndcube/extra_coords/extra_coords.py @@ -24,7 +24,7 @@ TimeTableCoordinate, ) -__all__ = ['ExtraCoordsABC', 'ExtraCoords'] +__all__ = ['ExtraCoords', 'ExtraCoordsABC'] class ExtraCoordsABC(abc.ABC): diff --git a/ndcube/extra_coords/table_coord.py b/ndcube/extra_coords/table_coord.py index a761cb54f..33c742fb9 100644 --- a/ndcube/extra_coords/table_coord.py +++ b/ndcube/extra_coords/table_coord.py @@ -22,7 +22,7 @@ except ImportError: pass -__all__ = ['TimeTableCoordinate', 'SkyCoordTableCoordinate', 'QuantityTableCoordinate', "BaseTableCoordinate", "MultipleTableCoordinate"] +__all__ = ["BaseTableCoordinate", "MultipleTableCoordinate", 'QuantityTableCoordinate', 'SkyCoordTableCoordinate', 'TimeTableCoordinate'] class Length1Tabular(_Tabular): diff --git a/ndcube/tests/helpers.py b/ndcube/tests/helpers.py index 1a35ddf15..c19ba56e7 100644 --- a/ndcube/tests/helpers.py +++ b/ndcube/tests/helpers.py @@ -21,13 +21,13 @@ from ndcube import NDCube, NDCubeSequence __all__ = [ - 'figure_test', - 'get_hash_library_name', - 'assert_extra_coords_equal', - 'assert_metas_equal', 'assert_cubes_equal', 'assert_cubesequences_equal', + 'assert_extra_coords_equal', + 'assert_metas_equal', 'assert_wcs_are_equal', + 'figure_test', + 'get_hash_library_name', ] diff --git a/ndcube/utils/cube.py b/ndcube/utils/cube.py index 9f55083e7..31e020c06 100644 --- a/ndcube/utils/cube.py +++ b/ndcube/utils/cube.py @@ -9,8 +9,12 @@ from ndcube.utils import wcs as wcs_utils -__all__ = ["sanitize_wcs", "sanitize_crop_inputs", "get_crop_item_from_points", - "propagate_rebin_uncertainties"] +__all__ = [ + "get_crop_item_from_points", + "propagate_rebin_uncertainties", + "sanitize_crop_inputs", + "sanitize_wcs", +] def sanitize_wcs(func): diff --git a/ndcube/utils/exceptions.py b/ndcube/utils/exceptions.py index 3e951c692..ce98fa833 100644 --- a/ndcube/utils/exceptions.py +++ b/ndcube/utils/exceptions.py @@ -6,7 +6,7 @@ """ import warnings -__all__ = ["NDCubeWarning", "NDCubeUserWarning", "NDCubeDeprecationWarning", "warn_user", "warn_deprecated"] +__all__ = ["NDCubeDeprecationWarning", "NDCubeUserWarning", "NDCubeWarning", "warn_deprecated", "warn_user"] class NDCubeWarning(Warning): diff --git a/ndcube/utils/misc.py b/ndcube/utils/misc.py index b41b0ae88..2dee74c69 100644 --- a/ndcube/utils/misc.py +++ b/ndcube/utils/misc.py @@ -1,6 +1,6 @@ import astropy.units as u -__all__ = ['unique_sorted', 'convert_quantities_to_units'] +__all__ = ['convert_quantities_to_units', 'unique_sorted'] def unique_sorted(iterable): diff --git a/ndcube/utils/wcs.py b/ndcube/utils/wcs.py index 11c682546..fe64560c7 100644 --- a/ndcube/utils/wcs.py +++ b/ndcube/utils/wcs.py @@ -10,14 +10,23 @@ from astropy.wcs.utils import pixel_to_pixel from astropy.wcs.wcsapi import BaseHighLevelWCS, BaseLowLevelWCS, low_level_api -__all__ = ['array_indices_for_world_objects', 'convert_between_array_and_pixel_axes', - 'calculate_world_indices_from_axes', 'wcs_ivoa_mapping', - 'pixel_axis_to_world_axes', 'world_axis_to_pixel_axes', - 'pixel_axis_to_physical_types', 'physical_type_to_pixel_axes', - 'physical_type_to_world_axis', 'get_dependent_pixel_axes', - 'get_dependent_array_axes', 'get_dependent_world_axes', - 'get_dependent_physical_types', 'array_indices_for_world_objects', - 'validate_physical_types'] +__all__ = [ + 'array_indices_for_world_objects', + 'array_indices_for_world_objects', + 'calculate_world_indices_from_axes', + 'convert_between_array_and_pixel_axes', + 'get_dependent_array_axes', + 'get_dependent_physical_types', + 'get_dependent_pixel_axes', + 'get_dependent_world_axes', + 'physical_type_to_pixel_axes', + 'physical_type_to_world_axis', + 'pixel_axis_to_physical_types', + 'pixel_axis_to_world_axes', + 'validate_physical_types', + 'wcs_ivoa_mapping', + 'world_axis_to_pixel_axes', +] class TwoWayDict(UserDict): diff --git a/ndcube/visualization/descriptor.py b/ndcube/visualization/descriptor.py index d20c27afe..bd6f0dc04 100644 --- a/ndcube/visualization/descriptor.py +++ b/ndcube/visualization/descriptor.py @@ -5,7 +5,7 @@ MISSING_ANIMATORS_ERROR_MSG = ("mpl_animators cannot be imported, so the default plotting " "functionality is disabled. Please install mpl_animators") -__all__ = ['PlotterDescriptor', 'MISSING_MATPLOTLIB_ERROR_MSG', 'MISSING_ANIMATORS_ERROR_MSG'] +__all__ = ['MISSING_ANIMATORS_ERROR_MSG', 'MISSING_MATPLOTLIB_ERROR_MSG', 'PlotterDescriptor'] class PlotterDescriptor: