X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/d0c44431d0e1386f0d3278f6a8bf84a01381e36a..b2afe3ce3ec7df3691a85462802b547b3d34ce4a:/nominatim/data/country_info.py diff --git a/nominatim/data/country_info.py b/nominatim/data/country_info.py index ada76325..eb0190b5 100644 --- a/nominatim/data/country_info.py +++ b/nominatim/data/country_info.py @@ -7,7 +7,7 @@ """ Functions for importing and managing static country information. """ -from typing import Dict, Any, Iterable, Tuple, Optional, Container +from typing import Dict, Any, Iterable, Tuple, Optional, Container, overload from pathlib import Path import psycopg2.extras @@ -87,6 +87,13 @@ def setup_country_config(config: Configuration) -> None: """ _COUNTRY_INFO.load(config) +@overload +def iterate() -> Iterable[Tuple[str, Dict[str, Any]]]: + ... + +@overload +def iterate(prop: str) -> Iterable[Tuple[str, Any]]: + ... def iterate(prop: Optional[str] = None) -> Iterable[Tuple[str, Dict[str, Any]]]: """ Iterate over country code and properties.