Skip to content

Commit

Permalink
Silence mypy on awaits (aio-libs#3927)
Browse files Browse the repository at this point in the history
    error: Incompatible types in "await" (actual type "Generator[Any, None, AbstractServer]", expected type "Awaitable[Any]")

Not sure how to fix, may be a typeshed problem
  • Loading branch information
AMDmi3 committed Aug 13, 2019
1 parent d5f003b commit 1228892
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion aiohttp/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ async def _wrap_create_connection(
with CeilTimeout(timeout.sock_connect):
return cast(
Tuple[asyncio.Transport, ResponseHandler],
await self._loop.create_connection(*args, **kwargs))
await self._loop.create_connection(*args, **kwargs)) # type: ignore # noqa
except cert_errors as exc:
raise ClientConnectorCertificateError(
req.connection_key, exc) from exc
Expand Down
4 changes: 2 additions & 2 deletions aiohttp/web_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ async def start(self) -> None:
loop = asyncio.get_event_loop()
server = self._runner.server
assert server is not None
self._server = await loop.create_server(
self._server = await loop.create_server( # type: ignore
server, self._host, self._port,
ssl=self._ssl_context, backlog=self._backlog,
reuse_address=self._reuse_address,
Expand Down Expand Up @@ -191,7 +191,7 @@ async def start(self) -> None:
loop = asyncio.get_event_loop()
server = self._runner.server
assert server is not None
self._server = await loop.create_server(
self._server = await loop.create_server( # type: ignore
server, sock=self._sock,
ssl=self._ssl_context, backlog=self._backlog)

Expand Down

0 comments on commit 1228892

Please sign in to comment.