Skip to content

Commit

Permalink
fix type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
cleder committed Dec 2, 2023
1 parent d30f680 commit 8d0c444
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions fastkml/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,9 @@ def _etree_coordinates(
if len(coordinates[0]) == 2:
tuples = (f"{c[0]:f},{c[1]:f}" for c in coordinates)
elif len(coordinates[0]) == 3:
tuples = (f"{c[0]:f},{c[1]:f},{c[2]:f}" for c in coordinates)
tuples = (
f"{c[0]:f},{c[1]:f},{c[2]:f}" for c in coordinates # type: ignore[misc]
)
else:
msg = f"Invalid dimensions in coordinates '{coordinates}'"
raise KMLWriteError(msg)
Expand Down Expand Up @@ -621,7 +623,7 @@ def create_multigeometry(
}
for geometry_name, constructor in map_to_geometries.items():
if geom_type == geometry_name:
return constructor(
return constructor( # type: ignore[operator, no-any-return]
*geometries,
)

Expand Down Expand Up @@ -686,7 +688,7 @@ def etree_element(
extrude=None,
tessellate=None,
altitude_mode=None,
geometry=geometry,
geometry=geometry, # type: ignore[arg-type]
).etree_element(precision=precision, verbosity=verbosity),
)
return element
Expand Down

0 comments on commit 8d0c444

Please sign in to comment.