mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +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:
@@ -234,7 +234,7 @@ def create_search_indices(conn, config, drop=False):
|
||||
bad_indices = [row[0] for row in list(cur)]
|
||||
for idx in bad_indices:
|
||||
LOG.info("Drop invalid index %s.", idx)
|
||||
cur.execute('DROP INDEX "{}"'.format(idx))
|
||||
cur.execute(pysql.SQL('DROP INDEX {}').format(pysql.Identifier(idx)))
|
||||
conn.commit()
|
||||
|
||||
sql = SQLPreprocessor(conn, config)
|
||||
|
||||
Reference in New Issue
Block a user