Lines Matching refs:cm
443 def _create_exit_wrapper(cm, cm_exit): argument
444 return MethodType(cm_exit, cm)
482 def enter_context(self, cm): argument
490 _cm_type = type(cm)
492 result = _cm_type.__enter__(cm)
493 self._push_cm_exit(cm, _exit)
509 def _push_cm_exit(self, cm, cm_exit): argument
511 _exit_wrapper = self._create_exit_wrapper(cm, cm_exit)
602 def _create_async_exit_wrapper(cm, cm_exit): argument
603 return MethodType(cm_exit, cm)
611 async def enter_async_context(self, cm): argument
617 _cm_type = type(cm)
619 result = await _cm_type.__aenter__(cm)
620 self._push_async_cm_exit(cm, _exit)
658 def _push_async_cm_exit(self, cm, cm_exit): argument
661 _exit_wrapper = self._create_async_exit_wrapper(cm, cm_exit)