Coverage for django_querycache/type_annotations.py: 100%
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1from typing import Any, Dict, List, Optional, Tuple, TypedDict, Union
4class IndicatorRow(TypedDict):
5 """
6 Type hinting for the input to 'indicator_table' objects
7 """
9 value: Optional[Union[str, int, float]]
10 name: Optional[str]
11 group: Optional[str]
14class IndicatorTable(TypedDict):
15 groups: Optional[List[str]]
16 rows: List[IndicatorRow]
19# The formal specifications for these types
20# can be found at
21# https://datatracker.ietf.org/doc/html/rfc7946#section-3.2
24Position = Tuple[float, float]
25PositionWithElevation = Tuple[float, float, float]
27CoordsSinglePart = Union[List[Position], List[PositionWithElevation]]
28CoordsMultiPart = List[CoordsSinglePart]
31class Geometry(TypedDict):
32 type: str
33 coordinates: Union[CoordsSinglePart, CoordsMultiPart]
36class Feature(TypedDict):
37 geometry: Geometry
38 properties: Dict[str, Any]
39 type: str
40 # Note that a Feature may also allow arbitrary additional data
41 # which can't be handled by mypy
44class FeatureCollection(TypedDict):
45 type: str
46 features: List[Feature]