diff --git a/stubs/geojson/geojson/utils.pyi b/stubs/geojson/geojson/utils.pyi index 9e35c35bfc81..2a2da79d2701 100644 --- a/stubs/geojson/geojson/utils.pyi +++ b/stubs/geojson/geojson/utils.pyi @@ -1,14 +1,15 @@ -from _typeshed import Incomplete -from collections.abc import Callable, Generator +from collections.abc import Callable, Generator, Iterable, Sequence from typing import Any, Literal from geojson.base import GeoJSON from geojson.geometry import Geometry, LineString, Point, Polygon -def coords(obj: GeoJSON | dict[str, Any]) -> Generator[tuple[float]]: ... -def map_coords(func: Callable[[Incomplete], float | Geometry], obj: GeoJSON | dict[str, Any]) -> dict[str, Any]: ... -def map_tuples(func: Callable[[Incomplete], float | Geometry], obj: GeoJSON | dict[str, Any]) -> dict[str, Any]: ... -def map_geometries(func: Callable[[Incomplete], float | Geometry], obj: GeoJSON | dict[str, Any]) -> dict[str, Any]: ... +def coords(obj: GeoJSON | dict[str, Any]) -> Generator[tuple[float, ...]]: ... +def map_coords(func: Callable[[float], float], obj: GeoJSON | dict[str, Any]) -> dict[str, Any]: ... +def map_tuples(func: Callable[[Sequence[float]], Iterable[float]], obj: GeoJSON | dict[str, Any]) -> dict[str, Any]: ... +def map_geometries( + func: Callable[[Geometry | dict[str, Any]], Geometry | dict[str, Any]], obj: GeoJSON | dict[str, Any] +) -> dict[str, Any]: ... def generate_random( featureType: Literal["Point", "LineString", "Polygon"], numberVertices: int = 3,