Skip to content

Commit

Permalink
Use cast instead of ignoring the type error so it works on Python 3.5…
Browse files Browse the repository at this point in the history
… too
  • Loading branch information
sjaensch committed Aug 27, 2018
1 parent 863a3c0 commit 1537f8d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bravado_asyncio/response_adapter.py
@@ -1,5 +1,6 @@
import asyncio
from typing import Any
from typing import cast
from typing import Dict
from typing import TypeVar

Expand Down Expand Up @@ -40,7 +41,7 @@ def raw_bytes(self) -> bytes:

@property
def reason(self) -> str:
return self._delegate.reason # type: ignore # aiohttp.ClientResponse doesn't annotate this attribute correctly
return cast(str, self._delegate.reason) # aiohttp 3.4.0 doesn't annotate this attribute correctly

@property
def headers(self) -> CIMultiDict:
Expand Down

0 comments on commit 1537f8d

Please sign in to comment.