From 83a0b1e62c337234354c977e786a2ba2921c7527 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alice=20de=20Bardonn=C3=A8che-Richard?= Date: Tue, 22 Oct 2024 14:12:51 +0200 Subject: [PATCH] minor: remove unnecessary else --- xdem/dem.py | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/xdem/dem.py b/xdem/dem.py index c235b897..25475a96 100644 --- a/xdem/dem.py +++ b/xdem/dem.py @@ -251,8 +251,7 @@ def ccrs(self) -> CompoundCRS | CRS | None: if self.vcrs is not None: ccrs = _build_ccrs_from_crs_and_vcrs(crs=self.crs, vcrs=self.vcrs) return ccrs - else: - return None + return None @overload def to_vcrs( @@ -362,17 +361,16 @@ def to_vcrs( self.set_vcrs(new_vcrs=vcrs) return None # Otherwise, return new DEM - else: - return DEM.from_array( - data=new_data, - transform=self.transform, - crs=self.crs, - nodata=self.nodata, - area_or_point=self.area_or_point, - tags=self.tags, - vcrs=vcrs, - cast_nodata=False, - ) + return DEM.from_array( + data=new_data, + transform=self.transform, + crs=self.crs, + nodata=self.nodata, + area_or_point=self.area_or_point, + tags=self.tags, + vcrs=vcrs, + cast_nodata=False, + ) @copy_doc(terrain, remove_dem_res_params=True) def slope(