Skip to content

Commit 50f5325

Browse files
committed
Fix for pylint
1 parent 0335af0 commit 50f5325

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

geospatial_tools/vector.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,9 @@ def add_and_fill_contained_column(
396396
logger.info(f"Selecting all vector features that are within {feature_name}")
397397
selected_features = select_all_within_feature(polygon_feature=polygon_feature, vector_features=vector_features)
398398
logger.info(f"Writing [{feature_name}] to selected vector features")
399-
[vector_features.at[idx, vector_column_name].add(feature_name) for idx in selected_features.index]
399+
[
400+
vector_features.at[idx, vector_column_name].add(feature_name) for idx in selected_features.index
401+
] # pylint: disable=W0106
400402

401403

402404
def find_and_write_all_contained_features(
@@ -449,7 +451,7 @@ def find_and_write_all_contained_features(
449451
),
450452
axis=1,
451453
)
452-
vector_features[vector_column_name] = vector_features[vector_column_name].apply(lambda x: sorted(x))
454+
vector_features[vector_column_name] = vector_features[vector_column_name].apply(sorted)
453455
logger.info("Process to find and identify contained features is completed")
454456

455457

@@ -502,6 +504,6 @@ def spatial_join_within(
502504
vector_features = vector_features.merge(grouped_gdf, on=temp_feature_id, how="left")
503505
vector_features = vector_features.rename(columns={polygon_column: vector_column_name})
504506
vector_features = vector_features.drop(columns=[temp_feature_id])
505-
vector_features[vector_column_name] = vector_features[vector_column_name].apply(lambda x: sorted(x))
507+
vector_features[vector_column_name] = vector_features[vector_column_name].apply(sorted)
506508
logger.info("Spatial join operation is completed")
507509
return vector_features

0 commit comments

Comments
 (0)