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

Method __enter__

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

Source from the content-addressed store, hash-verified

24 self.dir = dir
25
26 def __enter__(self):
27 if self.dir not in sys.path:
28 sys.path.append(self.dir)
29 self.added = True
30 else:
31 self.added = False
32
33 def __exit__(self, type, value, traceback):
34 if self.added:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected