Skip to content

Commit

Permalink
fix flake8: ignore yield from syntax errors
Browse files Browse the repository at this point in the history
  • Loading branch information
lamenezes committed Aug 11, 2016
1 parent 066752a commit c65ff0e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions tests/integration/aiohttp_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@

@asyncio.coroutine
def aiohttp_request(session, method, url, as_text, **kwargs):
response = yield from session.request(method, url, **kwargs)
return response, (yield from response.text()) if as_text else (yield from response.json())
response = yield from session.request(method, url, **kwargs) # NOQA: E999
return response, (yield from response.text()) if as_text else (yield from response.json()) # NOQA: E999
6 changes: 3 additions & 3 deletions vcr/stubs/aiohttp_stubs.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class MockClientResponse(ClientResponse):
# TODO: get encoding from header
@asyncio.coroutine
def json(self, *, encoding='utf-8', loads=json.loads):
def json(self, *, encoding='utf-8', loads=json.loads): # NOQA: E999
return loads(self.content.decode(encoding))

@asyncio.coroutine
Expand Down Expand Up @@ -58,15 +58,15 @@ def new_request(self, method, url, **kwargs):
response.close()
return response

response = yield from real_request(self, method, url, **kwargs)
response = yield from real_request(self, method, url, **kwargs) # NOQA: E999

vcr_response = {
'status': {
'code': response.status,
'message': response.reason,
},
'headers': dict(response.headers),
'body': {'string': (yield from response.text())},
'body': {'string': (yield from response.text())}, # NOQA: E999
'url': response.url,
}
cassette.append(vcr_request, vcr_response)
Expand Down

0 comments on commit c65ff0e

Please sign in to comment.