Agent: Fix mypy issues in capture_output.py

This commit is contained in:
Kekoa Kaaikala 2022-09-21 17:55:41 +00:00
parent ccfc41fc2f
commit 1621b494f4
1 changed files with 3 additions and 1 deletions

View File

@ -1,9 +1,11 @@
from __future__ import annotations
import io
import sys
class StdoutCapture:
def __enter__(self) -> None:
def __enter__(self) -> StdoutCapture:
self._orig_stdout = sys.stdout
self._new_stdout = io.StringIO()
sys.stdout = self._new_stdout