X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/d0c44431d0e1386f0d3278f6a8bf84a01381e36a..67664406da6c2fdf7753d64be0d5ca79a5599735:/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.