mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
remove unused code
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
"""
|
"""
|
||||||
Functions for bringing auxiliary data in the database up-to-date.
|
Functions for bringing auxiliary data in the database up-to-date.
|
||||||
"""
|
"""
|
||||||
from typing import MutableSequence, Tuple, Any, Type, Mapping, Sequence, List, cast
|
from typing import MutableSequence, Tuple, Any, Mapping, Sequence, List
|
||||||
import csv
|
import csv
|
||||||
import gzip
|
import gzip
|
||||||
import logging
|
import logging
|
||||||
@@ -222,26 +222,6 @@ def recompute_importance(conn: Connection) -> None:
|
|||||||
conn.commit()
|
conn.commit()
|
||||||
|
|
||||||
|
|
||||||
def _quote_php_variable(var_type: Type[Any], config: Configuration,
|
|
||||||
conf_name: str) -> str:
|
|
||||||
if var_type == bool:
|
|
||||||
return 'true' if config.get_bool(conf_name) else 'false'
|
|
||||||
|
|
||||||
if var_type == int:
|
|
||||||
return cast(str, getattr(config, conf_name))
|
|
||||||
|
|
||||||
if not getattr(config, conf_name):
|
|
||||||
return 'false'
|
|
||||||
|
|
||||||
if var_type == Path:
|
|
||||||
value = str(config.get_path(conf_name) or '')
|
|
||||||
else:
|
|
||||||
value = getattr(config, conf_name)
|
|
||||||
|
|
||||||
quoted = value.replace("'", "\\'")
|
|
||||||
return f"'{quoted}'"
|
|
||||||
|
|
||||||
|
|
||||||
def invalidate_osm_object(osm_type: str, osm_id: int, conn: Connection,
|
def invalidate_osm_object(osm_type: str, osm_id: int, conn: Connection,
|
||||||
recursive: bool = True) -> None:
|
recursive: bool = True) -> None:
|
||||||
""" Mark the given OSM object for reindexing. When 'recursive' is set
|
""" Mark the given OSM object for reindexing. When 'recursive' is set
|
||||||
|
|||||||
Reference in New Issue
Block a user