forked from hans/Nominatim
adapt annotations for SQLAlchemy 2.x
It is not possible to produce type annotations that work with both versions 1.4 and 2.0. So keep to the principle of only supporting newest versions when it comes to mypy. This means that some types may have to be string quoted to not cause issues when running with SQLAlchemy 1.4.
This commit is contained in:
@@ -37,7 +37,7 @@ class SearchConnection:
|
||||
|
||||
async def execute(self, sql: sa.sql.base.Executable,
|
||||
params: Union[Mapping[str, Any], Sequence[Mapping[str, Any]], None] = None
|
||||
) -> sa.engine.Result:
|
||||
) -> 'sa.engine.Result[Any]':
|
||||
""" Execute a 'execute()' query on the connection.
|
||||
"""
|
||||
return await self.connection.execute(sql, params)
|
||||
|
||||
Reference in New Issue
Block a user