From 8d0c4446583c9896047411d631ff45f5945e5136 Mon Sep 17 00:00:00 2001 From: Christian Ledermann Date: Sat, 2 Dec 2023 15:08:48 +0000 Subject: [PATCH] fix type annotations --- fastkml/geometry.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fastkml/geometry.py b/fastkml/geometry.py index 41fe4e08..c3ae2a88 100644 --- a/fastkml/geometry.py +++ b/fastkml/geometry.py @@ -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) @@ -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, ) @@ -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