|
| 1 | +from collections.abc import Iterable |
| 2 | +from typing import Any |
| 3 | + |
1 | 4 | from geojson.base import GeoJSON |
2 | 5 |
|
| 6 | +from geojson import Feature |
| 7 | + |
3 | 8 | DEFAULT_PRECISION: int |
4 | 9 |
|
5 | 10 | class Geometry(GeoJSON): |
6 | | - def __init__(self, coordinates=None, validate: bool = False, precision=None, **extra) -> None: ... |
| 11 | + def __init__( |
| 12 | + self, coordinates: None | Feature | Iterable[Any] = None, validate: bool = False, precision: None | int = None, **extra |
| 13 | + ) -> None: ... |
7 | 14 | @classmethod |
8 | | - def clean_coordinates(cls, coords, precision): ... |
| 15 | + def clean_coordinates( |
| 16 | + cls, coords: Geometry | tuple[Any, ...] | list[tuple[Any, ...]], precision: None | int |
| 17 | + ) -> None | tuple[Any, ...] | list[tuple[Any, ...]]: ... |
9 | 18 |
|
10 | 19 | class GeometryCollection(GeoJSON): |
11 | | - def __init__(self, geometries=None, **extra) -> None: ... |
12 | | - def errors(self): ... |
13 | | - def __getitem__(self, key): ... |
| 20 | + def __init__(self, geometries=..., **extra) -> None: ... |
| 21 | + def errors(self) -> list[str] | None: ... |
| 22 | + def __getitem__(self, key) -> Geometry | tuple[()] | None: ... |
14 | 23 |
|
15 | | -def check_point(coord): ... |
| 24 | +def check_point(coord) -> str | None: ... |
16 | 25 |
|
17 | 26 | class Point(Geometry): |
18 | | - def errors(self): ... |
| 27 | + def errors(self) -> list[str] | None: ... |
19 | 28 |
|
20 | 29 | class MultiPoint(Geometry): |
21 | | - def errors(self): ... |
| 30 | + def errors(self) -> list[str] | None: ... |
22 | 31 |
|
23 | | -def check_line_string(coord): ... |
| 32 | +def check_line_string(coord) -> str | None: ... |
24 | 33 |
|
25 | 34 | class LineString(MultiPoint): |
26 | | - def errors(self): ... |
| 35 | + def errors(self) -> list[str] | None: ... |
27 | 36 |
|
28 | 37 | class MultiLineString(Geometry): |
29 | | - def errors(self): ... |
| 38 | + def errors(self) -> list[str] | None: ... |
30 | 39 |
|
31 | | -def check_polygon(coord): ... |
| 40 | +def check_polygon(coord) -> str | None: ... |
32 | 41 |
|
33 | 42 | class Polygon(Geometry): |
34 | | - def errors(self): ... |
| 43 | + def errors(self) -> list[str] | None: ... |
35 | 44 |
|
36 | 45 | class MultiPolygon(Geometry): |
37 | | - def errors(self): ... |
| 46 | + def errors(self) -> list[str] | None: ... |
38 | 47 |
|
39 | 48 | class Default: ... |
0 commit comments