MCPcopy Create free account
hub / github.com/PRIME-RL/PRIME / swallow_io

Function swallow_io

eval/utils/execution_leetcode.py:604–609  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

602
603@contextlib.contextmanager
604def swallow_io():
605 stream = WriteOnlyStringIO()
606 with contextlib.redirect_stdout(stream):
607 with contextlib.redirect_stderr(stream):
608 with redirect_stdin(stream):
609 yield
610
611
612@contextlib.contextmanager

Callers 1

unsafe_executeFunction · 0.70

Calls 2

WriteOnlyStringIOClass · 0.70
redirect_stdinClass · 0.70

Tested by

no test coverage detected