mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-03-09 19:44:07 +00:00
pylint: avoid explicit use of format() function
Use psycopg2 SQL formatters for SQL and formatted string literals everywhere else.
This commit is contained in:
@@ -163,7 +163,7 @@ def connect(dsn):
|
||||
ctxmgr.connection = conn
|
||||
return ctxmgr
|
||||
except psycopg2.OperationalError as err:
|
||||
raise UsageError("Cannot connect to database: {}".format(err)) from err
|
||||
raise UsageError(f"Cannot connect to database: {err}") from err
|
||||
|
||||
|
||||
# Translation from PG connection string parameters to PG environment variables.
|
||||
|
||||
Reference in New Issue
Block a user