From f12fe54d2b7558c52370b2351d71ce79608566eb Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sun, 3 Jul 2022 17:21:46 +0200 Subject: [PATCH 1/1] restrict return type more --- nominatim/db/connection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.5