Start using warnings from stdlib.
[python_utils.git] / ansi.py
diff --git a/ansi.py b/ansi.py
index 4c09db3df76c1c66561f097e6c48d48caa62156c..d30ae27e625dbe585d82d3392837b39bf436f888 100755 (executable)
--- 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)