From 8d06531243f1b85541d526e01bad2155b11b033d Mon Sep 17 00:00:00 2001 From: Ball JGC Date: Sun, 1 Oct 2023 16:29:58 +0000 Subject: [PATCH] tidy formatting --- detectree2/models/outputs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/detectree2/models/outputs.py b/detectree2/models/outputs.py index d952b897..8d4ec5db 100644 --- a/detectree2/models/outputs.py +++ b/detectree2/models/outputs.py @@ -454,10 +454,10 @@ def post_clean(unclean_df: gpd.GeoDataFrame, return reclean_df.reset_index(drop=True) -def load_geopandas_dataframes(folder): # noqa:N605 +def load_geopandas_dataframes(folder): """Load all GeoPackage files in a folder into a list of GeoDataFrames.""" all_files = glob.glob(f"{folder}/*.gpkg") - filenames = [f for f in all_files if re.match(f"{folder}/crowns_\d+\.gpkg", f)] + filenames = [f for f in all_files if re.match(rf"{folder}/crowns_\d+\.gpkg", f)] # Load each file into a GeoDataFrame and add it to a list geopandas_dataframes = [gpd.read_file(filename) for filename in filenames]