Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
GriffinBabe committed Apr 17, 2024
1 parent 770b5ec commit 144b93f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
9 changes: 7 additions & 2 deletions src/openeo_gfmap/fetching/commons.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ def convert_band_names(desired_bands: list, band_dict: dict) -> list:


def resample_reproject(
datacube: openeo.DataCube, resolution: float, epsg_code: Optional[Union[str, int]] = None, method: str = 'near'
datacube: openeo.DataCube,
resolution: float,
epsg_code: Optional[Union[str, int]] = None,
method: str = "near",
) -> openeo.DataCube:
"""Reprojects the given datacube to the target epsg code, if the provided
epsg code is not None. Also performs checks on the give code to check
Expand All @@ -51,7 +54,9 @@ def resample_reproject(
raise ValueError(
f"Specified target_crs: {epsg_code} is not a valid " "EPSG code."
) from exc
return datacube.resample_spatial(resolution=resolution, projection=epsg_code, method=method)
return datacube.resample_spatial(
resolution=resolution, projection=epsg_code, method=method
)
return datacube.resample_spatial(resolution=resolution, method=method)


Expand Down
1 change: 0 additions & 1 deletion src/openeo_gfmap/fetching/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ def generic_default_processor(cube: openeo.DataCube, **params):
method=params.get("resampling_method", "near"),
)


if collection_name == "COPERNICUS_30":
cube = cube.min_time()

Expand Down
2 changes: 1 addition & 1 deletion src/openeo_gfmap/fetching/s2.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def s2_l2a_default_processor(cube: openeo.DataCube, **params):
cube,
params.get("target_resolution", 10.0),
params.get("target_crs", None),
method=params.get("resampling_method", "near")
method=params.get("resampling_method", "near"),
)
elif params.get("target_crs") is not None:
raise ValueError(
Expand Down

0 comments on commit 144b93f

Please sign in to comment.