Skip to content

Commit

Permalink
running pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
shartgring committed Aug 6, 2024
1 parent 2dbceef commit ccc33df
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions hydromt_delft3dfm/workflows/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,12 @@ def polygon_to_geometrylist(polygon):
x_crds.append(x_int)
y_crds.append([geometrylist.inner_outer_separator])
y_crds.append(y_int)
gl = GeometryList(x_coordinates=np.concatenate(x_crds), y_coordinates=np.concatenate(y_crds))
gl = GeometryList(
x_coordinates=np.concatenate(x_crds), y_coordinates=np.concatenate(y_crds)
)
return gl


# The function below is an altered version of the from_polygon method from hydrolib
# hydrolib > dhydamo > geometry > models.py > GeometryList > _to_polygon, to_geometry
def polygon_to_geometry(geometrylist):
Expand All @@ -357,7 +360,8 @@ def polygon_to_geometry(geometrylist):
for p in split_by(geometry, geometrylist.inner_outer_separator)
]
polygons.append(Polygon(shell=parts[0], holes=parts[1:]))
return MultiPolygon(polygons)
return MultiPolygon(polygons)


def links1d2d_add_links_1d_to_2d(
mesh: xu.UgridDataset,
Expand Down Expand Up @@ -628,7 +632,7 @@ def links1d2d_add_links_2d_to_1d_lateral(
)
# If the provided distance factor was None,
# no further selection is needed, all links are kept.
if dist_factor is None or dist_factor == 'None':
if dist_factor is None or dist_factor == "None":
link1d2d = mutils.links1d2d_from_hydrolib_network(network)
return link1d2d

Expand Down

0 comments on commit ccc33df

Please sign in to comment.