1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-08 16:53:23 +00:00

Drop support to asyncio.coroutine (py34 async/await syntax)

This commit is contained in:
Luiz Menezes
2018-09-18 13:59:40 -03:00
parent e559be758a
commit f7c051cde6
4 changed files with 42 additions and 31 deletions

View File

@@ -1,7 +1,3 @@
import asyncio
@asyncio.coroutine
def handle_coroutine(vcr, fn):
async def handle_coroutine(vcr, fn): # noqa: E999
with vcr as cassette:
return (yield from fn(cassette)) # noqa: E999
return (await fn(cassette)) # noqa: E999