X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/8b56b55761d0dcc817544f9c23e4a6c43e0f5d9d..8c54f9d7044c7f354fcad43de033b4a1cfc1ac56:/nominatim/api/v1/helpers.py?ds=sidebyside diff --git a/nominatim/api/v1/helpers.py b/nominatim/api/v1/helpers.py index 13087280..ffd06a6a 100644 --- a/nominatim/api/v1/helpers.py +++ b/nominatim/api/v1/helpers.py @@ -37,7 +37,7 @@ def zoom_to_rank(zoom: int) -> int: return REVERSE_MAX_RANKS[max(0, min(18, zoom))] -FEATURE_TYPE_TO_RANK: Dict[Optional[str], Any] = { +FEATURE_TYPE_TO_RANK: Dict[Optional[str], Tuple[int, int]] = { 'country': (4, 4), 'state': (8, 8), 'city': (14, 16), @@ -155,7 +155,7 @@ COORD_REGEX = [re.compile(r'(?:(?P
.*?)\s+)??' + r + r'(?:\s+(?P.*))?'
 )]
 
 def extract_coords_from_query(query: str) -> Tuple[str, Optional[float], Optional[float]]:
-    """ Look for something that is formated like a coordinate at the
+    """ Look for something that is formatted like a coordinate at the
         beginning or end of the query. If found, extract the coordinate and
         return the remaining query (or the empty string if the query
         consisted of nothing but a coordinate).