MCPcopy
hub / github.com/pallets/click / _close_with_exception_info

Method _close_with_exception_info

src/click/core.py:692–708  ·  view source on GitHub ↗

Unwind the exit stack by calling its :meth:`__exit__` providing the exception information to allow for exception handling by the various resources registered using :meth;`with_resource` :return: Whatever ``exit_stack.__exit__()`` returns.

(
        self,
        exc_type: type[BaseException] | None,
        exc_value: BaseException | None,
        tb: TracebackType | None,
    )

Source from the content-addressed store, hash-verified

690 self._close_with_exception_info(None, None, None)
691
692 def _close_with_exception_info(
693 self,
694 exc_type: type[BaseException] | None,
695 exc_value: BaseException | None,
696 tb: TracebackType | None,
697 ) -> bool | None:
698 """Unwind the exit stack by calling its :meth:`__exit__` providing the exception
699 information to allow for exception handling by the various resources registered
700 using :meth;`with_resource`
701
702 :return: Whatever ``exit_stack.__exit__()`` returns.
703 """
704 exit_result = self._exit_stack.__exit__(exc_type, exc_value, tb)
705 # In case the context is reused, create a new exit stack.
706 self._exit_stack = ExitStack()
707
708 return exit_result
709
710 @property
711 def command_path(self) -> str:

Callers 2

__exit__Method · 0.95
closeMethod · 0.95

Calls 1

__exit__Method · 0.45

Tested by

no test coverage detected