Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Bryn Pickering <[email protected]>
  • Loading branch information
KasiaKoz and brynpickering authored May 28, 2024
1 parent 29b9cdb commit 45e29b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/genet/schedule_elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -3698,7 +3698,7 @@ def write_to_json(self, output_dir: str):
json.dump(self.to_json(), outfile)
self.write_extras(output_dir)

def write_spatial(self, output_dir, epsg: str = None, filetype: Optional[str] = "parquet"):
def write_spatial(self, output_dir, epsg: str = None, filetype: str = "parquet"):
"""Transforms Schedule (if applicable) to geopandas.GeoDataFrame of nodes and links and saves to
the requested file format.
Expand Down
6 changes: 3 additions & 3 deletions src/genet/utils/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import geopandas as gpd
from pandas.core.dtypes.common import is_datetime64_any_dtype as is_datetime

from genet.output import sanitiser as sanitiser
from genet.utils import persistence as persistence
from genet.output import sanitiser
from genet.utils import persistence

SUPPORTED_FILE_FORMATS = ["parquet", "geoparquet", "geojson", "shp", "shapefile"]

Expand All @@ -26,7 +26,7 @@ def check_file_type_is_supported(filetype: str):


def save_geodataframe(
gdf: gpd.GeoDataFrame, filename: str, output_dir: str, filetype: Optional[str] = "parquet"
gdf: gpd.GeoDataFrame, filename: str, output_dir: str, filetype: str = "parquet"
):
"""Saves geopandas.GeoDataFrame to the requested file format
Expand Down

0 comments on commit 45e29b0

Please sign in to comment.