]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/api/results.py
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / nominatim / api / results.py
index 469f06d98703a6a960d3eb26663cb5331a1bdb48..9b67c51aa580ef38befd5e9efb80ed7b7885b825 100644 (file)
@@ -500,7 +500,7 @@ def _get_address_lookup_id(result: BaseResultT) -> int:
 
 
 async def _finalize_entry(conn: SearchConnection, result: BaseResultT) -> None:
-    assert result.address_rows
+    assert result.address_rows is not None
     postcode = result.postcode
     if not postcode and result.address:
         postcode = result.address.get('postcode')
@@ -590,7 +590,7 @@ async def complete_address_details(conn: SearchConnection, results: List[BaseRes
         return
 
     ltab = sa.func.JsonArrayEach(sa.type_coerce(lookup_ids, sa.JSON))\
-             .table_valued(sa.column('value', type_=sa.JSON)) # type: ignore[no-untyped-call]
+             .table_valued(sa.column('value', type_=sa.JSON))
 
     t = conn.t.placex
     taddr = conn.t.addressline
@@ -653,7 +653,7 @@ async def complete_address_details(conn: SearchConnection, results: List[BaseRes
     parent_lookup_ids = list(filter(lambda e: e['pid'] != e['lid'], lookup_ids))
     if parent_lookup_ids:
         ltab = sa.func.JsonArrayEach(sa.type_coerce(parent_lookup_ids, sa.JSON))\
-                 .table_valued(sa.column('value', type_=sa.JSON)) # type: ignore[no-untyped-call]
+                 .table_valued(sa.column('value', type_=sa.JSON))
         sql = sa.select(ltab.c.value['pid'].as_integer().label('src_place_id'),
                         t.c.place_id, t.c.osm_type, t.c.osm_id, t.c.name,
                         t.c.class_, t.c.type, t.c.extratags,