Skip to content

Commit 0f378f8

Browse files
committed
Fix Pylint errors
1 parent ec2f985 commit 0f378f8

3 files changed

Lines changed: 14 additions & 12 deletions

File tree

geospatial_tools/planetary_computer/sentinel_2.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def __init__(
7272

7373
@property
7474
def max_cloud_cover(self):
75-
""""""
75+
"""Max % of cloud cover used for Sentinel 2 product search."""
7676
return self._max_cloud_cover
7777

7878
@max_cloud_cover.setter
@@ -90,7 +90,7 @@ def max_cloud_cover(self, max_cloud_cover: int):
9090

9191
@property
9292
def date_ranges(self):
93-
""""""
93+
"""Date range used to search for Sentinel 2 products."""
9494
return self._date_ranges
9595

9696
@date_ranges.setter
@@ -181,7 +181,7 @@ def find_best_complete_products(self, max_cloud_cover: int | None = None, max_no
181181
return self.successful_results
182182

183183
def select_best_products_per_feature(self) -> GeoDataFrame:
184-
""""""
184+
"""Return a GeoDataFrame containing the best products for each Sentinel 2 tile."""
185185
spatial_join_results = spatial_join_within(
186186
polygon_features=self.sentinel2_tiling_grid,
187187
polygon_column=self.sentinel2_tiling_grid_column,

geospatial_tools/stac.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,11 @@ def list_available_catalogs(logger: logging.Logger = LOGGER) -> frozenset[str]:
9191

9292

9393
class AssetSubItem:
94-
""""""
94+
"""
95+
Class that represent a STAC asset sub item.
96+
97+
Generally represents a single satellite image band.
98+
"""
9599

96100
def __init__(self, asset, item_id: str, band: str, filename: str | Path):
97101
"""
@@ -111,7 +115,7 @@ def __init__(self, asset, item_id: str, band: str, filename: str | Path):
111115

112116

113117
class Asset:
114-
""""""
118+
"""Represents a STAC asset."""
115119

116120
def __init__(
117121
self,
@@ -240,32 +244,30 @@ def reproject_merged_asset(
240244
return None
241245

242246
def delete_asset_sub_items(self):
243-
""""""
247+
"""Delete all asset sub items that belong to this asset."""
244248
self.logger.info(f"Deleting asset sub items from asset [{self.asset_id}]")
245249
if self.list:
246250
for item in self.list:
247251
self.logger.info(f"Deleting [{item.filename}] ...")
248252
item.filename.unlink()
249253

250254
def delete_merged_asset(self):
251-
""""""
255+
"""Delete merged asset."""
252256
self.logger.info(f"Deleting merged asset file for [{self.merged_asset_path}]")
253257
self.merged_asset_path.unlink()
254258

255259
def delete_reprojected_asset(self):
256-
""""""
260+
"""Delete reprojected asset."""
257261
self.logger.info(f"Deleting reprojected asset file for [{self.reprojected_asset_path}]")
258262
self.reprojected_asset_path.unlink()
259263

260264
def _create_merged_asset_metadata(self):
261-
""""""
262265
self.logger.info("Creating merged asset metadata")
263266
file_list = [asset.filename for asset in self.list]
264267
meta = create_merged_raster_bands_metadata(file_list)
265268
return meta
266269

267270
def _get_asset_total_bands(self):
268-
""""""
269271
downloaded_file_list = [asset.filename for asset in self.list]
270272
total_band_count = get_total_band_count(downloaded_file_list)
271273
return total_band_count

geospatial_tools/vector.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,8 @@ def select_all_within_feature(polygon_feature: gpd.GeoSeries, vector_features: g
412412
This function is quite small and simple, but exists mostly as a.
413413
414414
Args:
415-
polygon_feature: Polygon feature that will be used to find which features of `vector_features` are contained within it.
416-
In this function, it is expected to be a GeoSeries, so a single row from a GeoDataFrame.
415+
polygon_feature: Polygon feature that will be used to find which features of `vector_features` are contained
416+
within it. In this function, it is expected to be a GeoSeries, so a single row from a GeoDataFrame.
417417
vector_features: The dataframe containing the features that will be grouped by polygon_feature.
418418
polygon_feature:
419419
vector_features:

0 commit comments

Comments
 (0)