Skip to content

Commit

Permalink
ignore mypy unreachable
Browse files Browse the repository at this point in the history
  • Loading branch information
cleder committed Dec 9, 2023
1 parent 40e60be commit 97de2f8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion fastkml/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ def _etree_coordinates(
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}'"
msg = ( # type: ignore[unreachable]
f"Invalid dimensions in coordinates '{coordinates}'"
)
raise KMLWriteError(msg)
element.text = " ".join(tuples)
return element
Expand Down
4 changes: 2 additions & 2 deletions tests/geometries/geometry_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,13 +473,13 @@ def test_create_kml_geometry_multipolygon(self) -> None:
"""Test the create_kml_geometry function."""
g = create_kml_geometry(
geo.MultiPolygon(
[
(
(
((0.0, 0.0), (0.0, 1.0), (1.0, 1.0), (1.0, 0.0)),
[((0.1, 0.1), (0.1, 0.2), (0.2, 0.2), (0.2, 0.1))],
),
(((0.0, 0.0), (0.0, 1.0), (1.0, 1.0), (1.0, 0.0)),),
],
),
),
)
assert len(g.geometry) == 2
Expand Down

0 comments on commit 97de2f8

Please sign in to comment.