summaryrefslogtreecommitdiff
path: root/ansi.py
diff options
context:
space:
mode:
authorScott Gasch <[email protected]>2021-10-31 13:08:51 -0700
committerScott Gasch <[email protected]>2021-10-31 13:08:51 -0700
commiteb9e6df32ed696158bf34dba6464277b648f5c74 (patch)
tree54ae278562008b0ffa834b2d34b2158d9119dc65 /ansi.py
parent05a26ae305adfc47f38b8534ec8f35640df3955e (diff)
Ugh, a bunch of things. @overrides. --lmodule. Chromecasts. etc...
Diffstat (limited to 'ansi.py')
-rwxr-xr-xansi.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ansi.py b/ansi.py
index 4c09db3..d30ae27 100755
--- a/ansi.py
+++ b/ansi.py
@@ -8,6 +8,8 @@ import re
import sys
from typing import Any, Callable, Dict, Iterable, Optional, Tuple
+from overrides import overrides
+
import logging_utils
logger = logging.getLogger(__name__)
@@ -1864,7 +1866,7 @@ class StdoutInterceptor(io.TextIOBase):
self.buf = ''
@abstractmethod
- def write(self, s):
+ def write(self, s: str):
pass
def __enter__(self) -> None:
@@ -1883,6 +1885,7 @@ class ProgrammableColorizer(StdoutInterceptor):
super().__init__()
self.patterns = [_ for _ in patterns]
+ @overrides
def write(self, s: str):
for pattern in self.patterns:
s = pattern[0].sub(pattern[1], s)