From 65c6a6293eeef58b9bd3d28c47c79a050aeb6b65 Mon Sep 17 00:00:00 2001 From: Christian Ledermann Date: Sat, 11 May 2024 14:02:33 +0100 Subject: [PATCH] fix type annotations --- .pre-commit-config.yaml | 4 ++-- fastkml/geometry.py | 2 -- fastkml/gx.py | 6 +++++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e4644638..cff6b6f7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,7 +25,7 @@ repos: hooks: - id: pyprojectsort - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.16 + rev: v0.17 hooks: - id: validate-pyproject - repo: https://github.com/ikamensh/flynt/ @@ -50,7 +50,7 @@ repos: hooks: - id: isort - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.4.3' + rev: 'v0.4.4' hooks: - id: ruff - repo: https://github.com/PyCQA/flake8 diff --git a/fastkml/geometry.py b/fastkml/geometry.py index 3ed4db7e..0245e133 100644 --- a/fastkml/geometry.py +++ b/fastkml/geometry.py @@ -647,7 +647,6 @@ def geometries(self) -> Optional[Iterable[geo.LinearRing]]: class Polygon(_Geometry): - outer_boundary_is: Optional[OuterBoundaryIs] inner_boundary_is: Optional[InnerBoundaryIs] @@ -835,7 +834,6 @@ def create_kml_geometry( class MultiGeometry(_Geometry): - kml_geometries: List[Union[Point, LineString, Polygon, LinearRing, Self]] def __init__( diff --git a/fastkml/gx.py b/fastkml/gx.py index b13508d1..88820ce2 100644 --- a/fastkml/gx.py +++ b/fastkml/gx.py @@ -157,7 +157,11 @@ def etree_elements( f"{name_spaces.get('gx', '')}coord", ) if self.coord: - element.text = " ".join([str(c) for c in self.coord.coords[0]]) + element.text = " ".join( + [ + str(c) for c in self.coord.coords[0] # type:ignore[misc] + ], + ) yield element element = config.etree.Element( # type: ignore[attr-defined] f"{name_spaces.get('gx', '')}angles",