MCPcopy Create free account
hub / github.com/ipython/ipython / __enter__

Method __enter__

IPython/utils/syspathcontext.py:48–53  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

46 self.dir = dir
47
48 def __enter__(self):
49 if self.dir not in sys.path:
50 sys.path.insert(0,self.dir)
51 self.added = True
52 else:
53 self.added = False
54
55 def __exit__(self, type, value, traceback):
56 if self.added:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected