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

Method __exit__

src/click/core.py:550–562  ·  view source on GitHub ↗
(
        self,
        exc_type: type[BaseException] | None,
        exc_value: BaseException | None,
        tb: TracebackType | None,
    )

Source from the content-addressed store, hash-verified

548 return self
549
550 def __exit__(
551 self,
552 exc_type: type[BaseException] | None,
553 exc_value: BaseException | None,
554 tb: TracebackType | None,
555 ) -> bool | None:
556 self._depth -= 1
557 exit_result: bool | None = None
558 if self._depth == 0:
559 exit_result = self._close_with_exception_info(exc_type, exc_value, tb)
560 pop_context()
561
562 return exit_result
563
564 @contextmanager
565 def scope(self, cleanup: bool = True) -> cabc.Generator[Context]:

Callers 1

Calls 2

pop_contextFunction · 0.85

Tested by

no test coverage detected