]> khamidou — GitHub mirrors - vcrpy.git/commitdiff
fix flake8: ignore yield from syntax errors
authorLuiz Menezes <luiz.menezesf@gmail.com>
Thu, 11 Aug 2016 22:44:21 +0000 (19:44 -0300)
committerLuiz Menezes <luiz.menezesf@gmail.com>
Thu, 11 Aug 2016 22:48:40 +0000 (19:48 -0300)
tests/integration/aiohttp_utils.py
vcr/stubs/aiohttp_stubs.py

index 16731f4de2457d7ae5648a0db366553a9e7c57fc..195e5eb29267220c9fe00eb0f89deac36067d74f 100644 (file)
@@ -3,5 +3,5 @@ import asyncio
 
 @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
index 6fa074e4ef37109bec0bc01dbb2335c8979d61ac..a19be6933ecfe0dd8ddf426d841646dda5ef5f39 100644 (file)
@@ -13,7 +13,7 @@ from vcr.request import Request
 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 vcr_request(cassette, real_request):
             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 vcr_request(cassette, real_request):
                 '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)