From e66ac2b660016c1039f321715949c85fb5cb583f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlson=20Moses=20B=C3=BCth?= <49326130+cbueth@users.noreply.github.com> Date: Mon, 22 Apr 2024 16:33:26 +0200 Subject: [PATCH] Lint `00-mwe.py` and `utils.py` --- examples/00-mwe.py | 7 ++++--- superblockify/partitioning/utils.py | 11 +++++++---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/examples/00-mwe.py b/examples/00-mwe.py index b4d2533..a141d4b 100644 --- a/examples/00-mwe.py +++ b/examples/00-mwe.py @@ -1,6 +1,6 @@ """Minimum working example for superblockify.""" -# While this script is running, figures will be generated on screen. +# While this script is running, figures will be generated on screen. # Close the figure windows to proceed with the script execution. @@ -12,10 +12,11 @@ name="Scheveningen_test", city_name="Scheveningen", search_str="Scheveningen, NL", - unit="time", # "time", "distance", any other edge attribute, or None to count edges + unit="time", + # "time", "distance", any other edge attribute, or None to count edges ) # If you want to select a different city, find the corresponding search string - # (`search_str`) at https://nominatim.openstreetmap.org/. + # (`search_str`) at https://nominatim.openstreetmap.org/. # The smaller the place, the quicker the partitioning. # For large places sufficient memory is required. diff --git a/superblockify/partitioning/utils.py b/superblockify/partitioning/utils.py index 15c87cc..ff871c4 100644 --- a/superblockify/partitioning/utils.py +++ b/superblockify/partitioning/utils.py @@ -37,8 +37,9 @@ def save_to_gpkg( The path to save the geodatapackage to. If None, it will be saved to the partitioners folder at (part.results_dir, part.name + ".gpkg") ltn_boundary : bool, optional - If True, the boundary of the Superblocks will be saved as a polygon into the `cell` - attribute of the Superblocks layer. For this, the tessellation needs to be calculated. + If True, the boundary of the Superblocks will be saved as a polygon into the + `cell` attribute of the Superblocks layer. For this, the tessellation needs + to be calculated. Raises ------ @@ -98,12 +99,14 @@ def save_to_gpkg( if partitioner.components: parts = partitioner.components logger.info( - "Using components attribute to save Superblocks to geodatapackage %s", filepath + "Using components attribute to save Superblocks to geodatapackage %s", + filepath, ) elif partitioner.partitions: parts = partitioner.partitions logger.info( - "Using partitions attribute to save Superblocks to geodatapackage %s", filepath + "Using partitions attribute to save Superblocks to geodatapackage %s", + filepath, ) if not isinstance(parts, list):