Update type annotations and upgrade mypy (#173)

This commit is contained in:
Sebastián Ramírez
2021-11-30 17:12:28 +01:00
committed by GitHub
parent 02da85c9ec
commit e30c7ef4e9
10 changed files with 90 additions and 76 deletions

View File

@@ -21,7 +21,7 @@ class AsyncSession(_AsyncSession):
self,
bind: Optional[Union[AsyncConnection, AsyncEngine]] = None,
binds: Optional[Mapping[object, Union[AsyncConnection, AsyncEngine]]] = None,
**kw,
**kw: Any,
):
# All the same code of the original AsyncSession
kw["future"] = True
@@ -52,7 +52,7 @@ class AsyncSession(_AsyncSession):
# util.immutabledict has the union() method. Is this a bug in SQLAlchemy?
execution_options = execution_options.union({"prebuffer_rows": True}) # type: ignore
return await greenlet_spawn( # type: ignore
return await greenlet_spawn(
self.sync_session.exec,
statement,
params=params,