From 7fb367bc959e46b43087d45770b56466beb38fce Mon Sep 17 00:00:00 2001 From: Jack O'Connor Date: Wed, 19 Dec 2018 17:36:25 +0100 Subject: [PATCH] a few more yapf tweaks --- peru/async_exit_stack.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/peru/async_exit_stack.py b/peru/async_exit_stack.py index da4d311..b3bba93 100644 --- a/peru/async_exit_stack.py +++ b/peru/async_exit_stack.py @@ -31,6 +31,7 @@ class AsyncExitStack: def _create_cb_wrapper(callback, *args, **kwds): def _exit_wrapper(exc_type, exc, tb): callback(*args, **kwds) + return _exit_wrapper ### AsyncExitStack staticmethods @@ -43,6 +44,7 @@ class AsyncExitStack: def _create_async_cb_wrapper(callback, *args, **kwds): async def _exit_wrapper(exc_type, exc, tb): await callback(*args, **kwds) + return _exit_wrapper ### _BaseExitStack methods @@ -170,6 +172,7 @@ class AsyncExitStack: # We manipulate the exception state so it behaves as though # we were actually nesting multiple with statements frame_exc = sys.exc_info()[1] + def _fix_exception_context(new_exc, old_exc): # Context may not be correct, so find the end of the chain while 1: