mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-08-02 00:52:20 +00:00
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:
committed by
Trenton Holmes
parent
2f0bcd0e05
commit
a9a0d0a65e
@@ -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."""
|
||||
|
||||
Reference in New Issue
Block a user