Fix: annotate ExportSink.stream's return type for pyrefly

The abstract method had no return annotation, so pyrefly inferred -> None
and flagged both DirectoryExportSink.stream and ZipExportSink.stream as
incompatible overrides.
This commit is contained in:
stumpylog
2026-08-01 14:37:35 -07:00
committed by Trenton Holmes
parent 2f0bcd0e05
commit a9a0d0a65e
+1 -2
View File
@@ -86,8 +86,7 @@ class ExportSink(AbstractContextManager, abc.ABC):
def add_json(self, content: list | dict, arcname: str) -> None: ...
@abc.abstractmethod
def stream(self, arcname: str): # -> contextmanager yielding TextIO
...
def stream(self, arcname: str) -> AbstractContextManager[TextIO]: ...
def _open(self) -> None:
"""Hook called on context entry. Override as needed."""