doc: internal: fix `MultiCapture.readouterr` (#6878)
Remove wrong docstring: it might actually return bytes. Replace it with a type annotation which is clear enough.
This commit is contained in:
parent
db92cea14c
commit
ac7ebfa22e
|
@ -510,12 +510,16 @@ class MultiCapture:
|
||||||
if self.in_:
|
if self.in_:
|
||||||
self.in_.done()
|
self.in_.done()
|
||||||
|
|
||||||
def readouterr(self):
|
def readouterr(self) -> CaptureResult:
|
||||||
""" return snapshot unicode value of stdout/stderr capturings. """
|
if self.out:
|
||||||
return CaptureResult(
|
out = self.out.snap()
|
||||||
self.out.snap() if self.out is not None else "",
|
else:
|
||||||
self.err.snap() if self.err is not None else "",
|
out = ""
|
||||||
)
|
if self.err:
|
||||||
|
err = self.err.snap()
|
||||||
|
else:
|
||||||
|
err = ""
|
||||||
|
return CaptureResult(out, err)
|
||||||
|
|
||||||
|
|
||||||
class NoCapture:
|
class NoCapture:
|
||||||
|
|
Loading…
Reference in New Issue