]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/db/async_connection.py
Merge pull request #3356 from lonvia/use-date-from-osm2pgsql-prop
[nominatim.git] / nominatim / db / async_connection.py
index d1e542f572472ec60a6abd3be276d2094ed1458f..07767e48ad8934c5dc831c16e9c0040e9a3a6d01 100644 (file)
@@ -69,8 +69,8 @@ class DBConnection:
         self.current_params: Optional[Sequence[Any]] = None
         self.ignore_sql_errors = ignore_sql_errors
 
-        self.conn: Optional['psycopg2.connection'] = None
-        self.cursor: Optional['psycopg2.cursor'] = None
+        self.conn: Optional['psycopg2._psycopg.connection'] = None
+        self.cursor: Optional['psycopg2._psycopg.cursor'] = None
         self.connect(cursor_factory=cursor_factory)
 
     def close(self) -> None:
@@ -78,7 +78,7 @@ class DBConnection:
         """
         if self.conn is not None:
             if self.cursor is not None:
-                self.cursor.close() # type: ignore[no-untyped-call]
+                self.cursor.close()
                 self.cursor = None
             self.conn.close()