MCPcopy Index your code
hub / github.com/ipython/ipython / __exit__

Method __exit__

IPython/utils/syspathcontext.py:28–40  ·  view source on GitHub ↗
(
        self,
        exc_type: type[BaseException] | None,
        exc_val: BaseException | None,
        exc_tb: TracebackType | None,
    )

Source from the content-addressed store, hash-verified

26 return self
27
28 def __exit__(
29 self,
30 exc_type: type[BaseException] | None,
31 exc_val: BaseException | None,
32 exc_tb: TracebackType | None,
33 ) -> Literal[False]:
34 if self.added:
35 try:
36 sys.path.remove(self.dir)
37 except ValueError:
38 pass
39 # Returning False causes any exceptions to be re-raised.
40 return False

Callers

nothing calls this directly

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected