From c65ff0e7b331032ffa83690a4fb359b7ac2c8697 Mon Sep 17 00:00:00 2001 From: Luiz Menezes Date: Thu, 11 Aug 2016 19:44:21 -0300 Subject: [PATCH] fix flake8: ignore yield from syntax errors --- tests/integration/aiohttp_utils.py | 4 ++-- vcr/stubs/aiohttp_stubs.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/integration/aiohttp_utils.py b/tests/integration/aiohttp_utils.py index 16731f4d..195e5eb2 100644 --- a/tests/integration/aiohttp_utils.py +++ b/tests/integration/aiohttp_utils.py @@ -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 diff --git a/vcr/stubs/aiohttp_stubs.py b/vcr/stubs/aiohttp_stubs.py index 6fa074e4..a19be693 100644 --- a/vcr/stubs/aiohttp_stubs.py +++ b/vcr/stubs/aiohttp_stubs.py @@ -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 @@ -58,7 +58,7 @@ 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': { @@ -66,7 +66,7 @@ def new_request(self, method, url, **kwargs): '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)