MCPcopy Index your code
hub / github.com/zai-org/CodeGeeX2 / chdir

Function chdir

evaluation/execution.py:463–474  ·  view source on GitHub ↗
(root)

Source from the content-addressed store, hash-verified

461
462@contextlib.contextmanager
463def chdir(root):
464 if root == ".":
465 yield
466 return
467 cwd = os.getcwd()
468 os.chdir(root)
469 try:
470 yield
471 except BaseException as exc:
472 raise exc
473 finally:
474 os.chdir(cwd)
475
476
477def reliability_guard(maximum_memory_bytes: Optional[int] = None):

Callers 1

create_tempdirFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected