X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/d0c44431d0e1386f0d3278f6a8bf84a01381e36a..d231ff60ed94d2f9bd6cb6ebbad744a46ba56e8f:/nominatim/data/country_info.py?ds=sidebyside 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.