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 Oct 15, 2024
1 parent 671d6d4 commit 35af069
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
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 35af069

Please sign in to comment.