From 78041c7a6a8c713490739a191d6df2d694670acb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Wed, 10 Apr 2019 14:46:11 +0200 Subject: [PATCH] daemon: Mypy fixes. --- pantalaimon/daemon.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pantalaimon/daemon.py b/pantalaimon/daemon.py index ad9d292..b00ebea 100755 --- a/pantalaimon/daemon.py +++ b/pantalaimon/daemon.py @@ -43,7 +43,7 @@ class ProxyDaemon: default_session = attr.ib(init=False, default=None) def get_access_token(self, request): - # type: (aiohttp.BaseRequest) -> str + # type: (aiohttp.web.BaseRequest) -> str """Extract the access token from the request. This method extracts the access token either from the query string or @@ -63,11 +63,11 @@ class ProxyDaemon: async def forward_request( self, - request, - params=None, - session=None + request, # type: aiohttp.web.BaseRequest + params=None, # type: CIMultiDict + session=None # type: aiohttp.ClientSession ): - # type: (aiohttp.BaseRequest, aiohttp.ClientSession) -> str + # type: (...) -> aiohttp.ClientResponse """Forward the given request to our configured homeserver. Args: @@ -82,6 +82,8 @@ class ProxyDaemon: self.default_session = ClientSession() session = self.default_session + assert session + path = request.path method = request.method