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 Nov 25, 2024
1 parent 234e824 commit 3ad088e
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion gpm/accessor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
4 changes: 2 additions & 2 deletions gpm/bucket/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
__all__ = [
"LonLatPartitioning",
"TilePartitioning",
"read",
"merge_granule_buckets",
"write_granules_bucket",
"read",
"write_bucket",
"write_granules_bucket",
]
4 changes: 2 additions & 2 deletions gpm/gv/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
2 changes: 1 addition & 1 deletion gpm/io/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
10 changes: 5 additions & 5 deletions gpm/visualization/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
6 changes: 3 additions & 3 deletions gpm/visualization/facetgrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion gpm/visualization/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion gpm/visualization/orbit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3ad088e

Please sign in to comment.