]> git.openstreetmap.org Git - nominatim.git/blobdiff - src/nominatim_db/tools/convert_sqlite.py
Fix gunicorn invocation
[nominatim.git] / src / nominatim_db / tools / convert_sqlite.py
index 47ab63b718f872a121cffd2ca5173915c64d93da..d53527d181f4f670e9028b0cf27869751e3a9bfa 100644 (file)
@@ -7,7 +7,7 @@
 """
 Exporting a Nominatim database to SQlite.
 """
-from typing import Set, Any
+from typing import Set, Any, Optional, Union
 import datetime as dt
 import logging
 from pathlib import Path
@@ -16,12 +16,13 @@ import sqlalchemy as sa
 
 import nominatim_api as napi
 from nominatim_api.search.query_analyzer_factory import make_query_analyzer
-from nominatim_core.typing import SaSelect, SaRow
-from nominatim_core.db.sqlalchemy_types import Geometry, IntArray
+from nominatim_api.typing import SaSelect, SaRow
+from nominatim_api.sql.sqlalchemy_types import Geometry, IntArray
 
 LOG = logging.getLogger()
 
-async def convert(project_dir: Path, outfile: Path, options: Set[str]) -> None:
+async def convert(project_dir: Optional[Union[str, Path]],
+                  outfile: Path, options: Set[str]) -> None:
     """ Export an existing database to sqlite. The resulting database
         will be usable against the Python frontend of Nominatim.
     """