diff options
| author | Scott <[email protected]> | 2022-02-02 08:31:42 -0800 |
|---|---|---|
| committer | Scott <[email protected]> | 2022-02-02 08:31:42 -0800 |
| commit | 971d4ba141459f78d10d5770b9459d1ead7d49a0 (patch) | |
| tree | 35da8cbc94b7e09a34283387a0bd5b8ae553541f /ansi.py | |
| parent | 6cf1d61b80d02937dbca9025c1922568d42a8c73 (diff) | |
More mypy cleanup.
Diffstat (limited to 'ansi.py')
| -rwxr-xr-x | ansi.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1890,19 +1890,19 @@ def bg( class StdoutInterceptor(io.TextIOBase): def __init__(self): - self.saved_stdout: Optional[io.TextIOBase] = None + self.saved_stdout: io.TextIO = None self.buf = '' @abstractmethod def write(self, s: str): pass - def __enter__(self) -> None: + def __enter__(self): self.saved_stdout = sys.stdout sys.stdout = self - return None + return self - def __exit__(self, *args) -> bool: + def __exit__(self, *args) -> Optional[bool]: sys.stdout = self.saved_stdout print(self.buf) return None |
