How about import io and calling io.BinaryIO(...) on arg 1, the RawIOBase to wrap it?
Good point though. There is code in Py7zr to explicitly support multivolumefile.MultiVolume , and MultiVolume’s been a RawIOBAse for the last 5 years so maybe the Py7zr team would accept a PR that includes that in the type signature a bit, or adjusts the line that throws that error.
Thanks for the tip, I will have to research this as I’m not familiar with the io library.
What do you think about casting or simply telling mypy to ignore the error? I’m asking because I’m apprehensive to modifying code in a way I don’t understand fully.