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

Method _push_cm_exit

Lib/contextlib.py:547–550  ·  view source on GitHub ↗

Helper to correctly register callbacks to __exit__ methods.

(self, cm, cm_exit)

Source from the content-addressed store, hash-verified

545 return callback # Allow use as a decorator
546
547 def _push_cm_exit(self, cm, cm_exit):
548 """Helper to correctly register callbacks to __exit__ methods."""
549 _exit_wrapper = self._create_exit_wrapper(cm, cm_exit)
550 self._push_exit_callback(_exit_wrapper, True)
551
552 def _push_exit_callback(self, callback, is_sync=True):
553 self._exit_callbacks.append((is_sync, callback))

Callers 2

pushMethod · 0.95
enter_contextMethod · 0.95

Calls 2

_create_exit_wrapperMethod · 0.95
_push_exit_callbackMethod · 0.95

Tested by

no test coverage detected