From: Sarah Hoffmann Date: Sun, 3 Jul 2022 15:21:46 +0000 (+0200) Subject: restrict return type more X-Git-Tag: v4.1.0~10^2~31 X-Git-Url: https://git.openstreetmap.org/nominatim.git/commitdiff_plain/f12fe54d2b7558c52370b2351d71ce79608566eb restrict return type more --- diff --git a/nominatim/db/connection.py b/nominatim/db/connection.py index 729e8a70..8d9c742a 100644 --- a/nominatim/db/connection.py +++ b/nominatim/db/connection.py @@ -7,7 +7,7 @@ """ Specialised connection and cursor functions. """ -from typing import List, Optional, Any, Callable, ContextManager, Mapping, cast, overload, Tuple +from typing import List, Optional, Any, Callable, ContextManager, Dict, Mapping, cast, overload, Tuple import contextlib import logging import os @@ -225,7 +225,7 @@ _PG_CONNECTION_STRINGS = { def get_pg_env(dsn: str, - base_env: Optional[Mapping[str, str]] = None) -> Mapping[str, str]: + base_env: Optional[Mapping[str, str]] = None) -> Dict[str, str]: """ Return a copy of `base_env` with the environment variables for PostgresSQL set up from the given database connection string. If `base_env` is None, then the OS environment is used as a base