We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b747390 commit 519120fCopy full SHA for 519120f
src/_pytest/capture.py
@@ -177,7 +177,8 @@ def name(self) -> str:
177
def mode(self) -> str:
178
# TextIOWrapper doesn't expose a mode, but at least some of our
179
# tests check it.
180
- return self.buffer.mode.replace("b", "") # type: ignore[no-any-return,attr-defined]
+ assert hasattr(self.buffer, 'mode')
181
+ return cast(str, self.buffer.mode.replace("b", ""))
182
183
184
class CaptureIO(io.TextIOWrapper):
0 commit comments