Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions stubs/geojson/geojson/utils.pyi
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Loading