MCPcopy Index your code
hub / github.com/zai-org/CodeGeeX / WriteOnlyStringIO

Class WriteOnlyStringIO

codegeex/benchmark/execution.py:441–455  ·  view source on GitHub ↗

StringIO that throws an exception when it's read from

Source from the content-addressed store, hash-verified

439
440
441class WriteOnlyStringIO(io.StringIO):
442 """ StringIO that throws an exception when it's read from """
443
444 def read(self, *args, **kwargs):
445 raise IOError
446
447 def readline(self, *args, **kwargs):
448 raise IOError
449
450 def readlines(self, *args, **kwargs):
451 raise IOError
452
453 def readable(self, *args, **kwargs):
454 """ Returns True if the IO object can be read. """
455 return False
456
457
458class redirect_stdin(contextlib._RedirectStream): # type: ignore

Callers 1

swallow_ioFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected