From 35af069e6a7b1252557a9da3ea61a1c17bce5421 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 00:02:24 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- gpm/visualization/facetgrid.py | 6 +++--- gpm/visualization/grid.py | 2 +- gpm/visualization/orbit.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) 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