Skip to content

Commit

Permalink
minor: remove unnecessary else
Browse files Browse the repository at this point in the history
  • Loading branch information
adebardo committed Oct 22, 2024
1 parent 3287594 commit 11176a8
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions xdem/dem.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 11176a8

Please sign in to comment.