Skip to content

Commit

Permalink
- Correct types in called function write_geoms
Browse files Browse the repository at this point in the history
- Open question in def delete is whether type should be 'int' or 'List(int)'
  • Loading branch information
Leynse committed Feb 14, 2025
1 parent 3f668ff commit 2c05ce5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion hydromt_sfincs/cross_sections.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def add(self,
self.set(gdf, merge=True)

def delete(self,
index: int,
index: int, #FIXME - should this be List(int)?
):
"""Remove (multiple) line(s) from cross-sections.
Expand Down
2 changes: 1 addition & 1 deletion hydromt_sfincs/observation_points.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def add(self,
self.set(gdf, merge=True)

def delete(self,
index: int,
index: int, #FIXME - should this be List(int)?
):
"""Remove (multiple) point(s) from observation points.
Expand Down
8 changes: 4 additions & 4 deletions hydromt_sfincs/thin_dams.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def write(self, filename=None): #TODO - TL: filename=None - still needed?
# self.config.XXX
# self._filename = XXX
struct = utils.gdf2linestring(self.data)
utils.write_geoms(self._filename, struct, stype="crs", fmt=fmt) #=utils.py function
utils.write_geoms(self._filename, struct, stype="thd", fmt=fmt) #=utils.py function

# TODO - write also as geojson - TL: at what level do we want to do that?
# if self._write_gis:
Expand Down Expand Up @@ -102,11 +102,11 @@ def create(
**kwargs,
):
"""Create model thin dam lines.
(old name: setup_observation_lines)
(old name: setup_structures)
Adds model layers:
* **crs** geom: thin dam lines
* **thd** geom: thin dam lines
Arguments
---------
Expand Down Expand Up @@ -145,7 +145,7 @@ def add(self,
self.set(gdf, merge=True)

def delete(self,
index: int,
index: int, #FIXME - should this be List(int)?
):
"""Remove (multiple) line(s) from thin dams.
Expand Down
2 changes: 1 addition & 1 deletion hydromt_sfincs/weirs.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def write(self, filename=None): #TODO - TL: filename=None - still needed?
# self.config.XXX
# self._filename = XXX
struct = utils.gdf2linestring(self.data)
utils.write_geoms(self._filename, struct, stype="crs", fmt=fmt) #=utils.py function
utils.write_geoms(self._filename, struct, stype="weir", fmt=fmt) #=utils.py function

# TODO - write also as geojson - TL: at what level do we want to do that?
# if self._write_gis:
Expand Down

0 comments on commit 2c05ce5

Please sign in to comment.