diff --git a/hocr_tools_lib/utils/typing_utils.py b/hocr_tools_lib/utils/typing_utils.py index 5266a87..068b16a 100644 --- a/hocr_tools_lib/utils/typing_utils.py +++ b/hocr_tools_lib/utils/typing_utils.py @@ -10,6 +10,10 @@ class SupportsRead(Protocol[_T_co]): # type: ignore[no-redef] def read(self, __length: int = ...) -> _T_co: ... + class SupportsReadClose(SupportsRead[_T_co], Protocol[_T_co]): # type: ignore[no-redef] + def close(self) -> None: + ... + __all__ = [ "SupportsRead",