MCPcopy Index your code
hub / github.com/rocky/python-uncompyle6 / wrapper

Function wrapper

test/simple_source/bug37/10_async.py:15–23  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

13
14 @functools.wraps(func)
15 def wrapper(*args, **kwargs):
16 coro = func(*args, **kwargs)
17 loop = asyncio.new_event_loop()
18 asyncio.set_event_loop(loop)
19 try:
20 return loop.run_until_complete(coro)
21 finally:
22 loop.close()
23 asyncio.set_event_loop(None)
24
25 return wrapper
26

Callers

nothing calls this directly

Calls 2

funcFunction · 0.50
closeMethod · 0.45

Tested by

no test coverage detected