MCPcopy Index your code
hub / github.com/RustPython/RustPython / _push_async_cm_exit

Method _push_async_cm_exit

Lib/contextlib.py:707–711  ·  view source on GitHub ↗

Helper to correctly register coroutine function to __aexit__ method.

(self, cm, cm_exit)

Source from the content-addressed store, hash-verified

705 await self.__aexit__(None, None, None)
706
707 def _push_async_cm_exit(self, cm, cm_exit):
708 """Helper to correctly register coroutine function to __aexit__
709 method."""
710 _exit_wrapper = self._create_async_exit_wrapper(cm, cm_exit)
711 self._push_exit_callback(_exit_wrapper, False)
712
713 async def __aenter__(self):
714 return self

Callers 2

enter_async_contextMethod · 0.95
push_async_exitMethod · 0.95

Calls 2

_push_exit_callbackMethod · 0.80

Tested by

no test coverage detected