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

Function swallow_io

evaluation/execution.py:422–427  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

420
421@contextlib.contextmanager
422def swallow_io():
423 stream = WriteOnlyStringIO()
424 with contextlib.redirect_stdout(stream):
425 with contextlib.redirect_stderr(stream):
426 with redirect_stdin(stream):
427 yield
428
429
430@contextlib.contextmanager

Callers 1

unsafe_executeFunction · 0.85

Calls 2

WriteOnlyStringIOClass · 0.85
redirect_stdinClass · 0.85

Tested by

no test coverage detected