From afb28e07ab9dbaf86cc1778782694bfcde08fb11 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 3 Dec 2024 00:36:43 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- gpm/accessor/__init__.py | 2 +- gpm/bucket/__init__.py | 4 ++-- gpm/gv/__init__.py | 4 ++-- gpm/io/download.py | 2 +- gpm/visualization/__init__.py | 10 +++++----- gpm/visualization/facetgrid.py | 6 +++--- gpm/visualization/grid.py | 2 +- gpm/visualization/orbit.py | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/gpm/accessor/__init__.py b/gpm/accessor/__init__.py index e60bcaab..4a429dab 100644 --- a/gpm/accessor/__init__.py +++ b/gpm/accessor/__init__.py @@ -27,4 +27,4 @@ """This directory defines GPM-API xarray accessors.""" from .methods import GPM_DataArray_Accessor, GPM_Dataset_Accessor -__all__ = ["GPM_Dataset_Accessor", "GPM_DataArray_Accessor"] +__all__ = ["GPM_DataArray_Accessor", "GPM_Dataset_Accessor"] diff --git a/gpm/bucket/__init__.py b/gpm/bucket/__init__.py index fb89a2f5..7600d4a2 100644 --- a/gpm/bucket/__init__.py +++ b/gpm/bucket/__init__.py @@ -46,8 +46,8 @@ __all__ = [ "LonLatPartitioning", "TilePartitioning", - "read", "merge_granule_buckets", - "write_granules_bucket", + "read", "write_bucket", + "write_granules_bucket", ] diff --git a/gpm/gv/__init__.py b/gpm/gv/__init__.py index a723aea6..181896ff 100644 --- a/gpm/gv/__init__.py +++ b/gpm/gv/__init__.py @@ -36,10 +36,10 @@ from gpm.gv.routines import volume_matching __all__ = [ + "calibration_summary", "compare_maps", + "reflectivity_distribution", "reflectivity_scatterplot", "reflectivity_scatterplots", - "reflectivity_distribution", - "calibration_summary", "volume_matching", ] diff --git a/gpm/io/download.py b/gpm/io/download.py index 4fb52769..a0f187f8 100644 --- a/gpm/io/download.py +++ b/gpm/io/download.py @@ -991,7 +991,7 @@ def download_archive( list_status = [] list_versions = [] for i, date in enumerate(dates): - warn_missing_files = not (i == 0 or i == len(dates) - 1 and date == end_time) + warn_missing_files = not (i == 0 or (i == len(dates) - 1 and date == end_time)) status, available_version = _download_daily_data( date=date, diff --git a/gpm/visualization/__init__.py b/gpm/visualization/__init__.py index b9813fe4..ed596d1f 100644 --- a/gpm/visualization/__init__.py +++ b/gpm/visualization/__init__.py @@ -37,12 +37,12 @@ ) __all__ = [ + "add_map_inset", + "plot_cartopy_background", + "plot_colorbar", + "plot_image", "plot_labels", - "plot_patches", "plot_map", - "plot_image", "plot_map_mesh", - "add_map_inset", - "plot_colorbar", - "plot_cartopy_background", + "plot_patches", ] diff --git a/gpm/visualization/facetgrid.py b/gpm/visualization/facetgrid.py index d9a593a6..da7b805c 100644 --- a/gpm/visualization/facetgrid.py +++ b/gpm/visualization/facetgrid.py @@ -299,7 +299,7 @@ def map_dataarray( FacetGrid object """ - if kwargs.get("cbar_ax", None) is not None: + if kwargs.get("cbar_ax") is not None: raise ValueError("cbar_ax not supported by FacetGrid.") cmap_params, cbar_kwargs = _process_cmap_cbar_kwargs( @@ -324,8 +324,8 @@ def map_dataarray( da_proto = da_proto.isel({self._row_var: 0}) if self._col_var in list(da_proto.dims): da_proto = da_proto.isel({self._col_var: 0}) - if kwargs.get("rgb", None): - da_proto = da_proto.isel({kwargs.get("rgb", None): 0}) + if kwargs.get("rgb"): + da_proto = da_proto.isel({kwargs.get("rgb"): 0}) x, y = _infer_xy_labels( darray=da_proto, x=x, diff --git a/gpm/visualization/grid.py b/gpm/visualization/grid.py index 3236f588..830b69a4 100644 --- a/gpm/visualization/grid.py +++ b/gpm/visualization/grid.py @@ -269,7 +269,7 @@ def plot_grid_mesh( ) # Infer x and y - x, y = infer_xy_labels(xr_obj, x=x, y=y, rgb=plot_kwargs.get("rgb", None)) + x, y = infer_xy_labels(xr_obj, x=x, y=y, rgb=plot_kwargs.get("rgb")) # Create 2D mesh xarray.DataArray da = create_grid_mesh_data_array(xr_obj, x=x, y=y) diff --git a/gpm/visualization/orbit.py b/gpm/visualization/orbit.py index 6d25d909..887bc6f3 100644 --- a/gpm/visualization/orbit.py +++ b/gpm/visualization/orbit.py @@ -167,7 +167,7 @@ def wrapper(*args, **kwargs): ax = args[1] if len(args) > 1 else kwargs.get("ax") # Define dimensions and coordinates - x, y = infer_map_xy_coords(da, x=kwargs.get("x", None), y=kwargs.get("y", None)) + x, y = infer_map_xy_coords(da, x=kwargs.get("x"), y=kwargs.get("y")) along_track_dim, cross_track_dim = infer_orbit_xy_dim(da, x=x, y=y) # Define kwargs