No warnings are raised for this:
from io import BytesIO
def open(fp: BytesIO):
...
Instead of the concrete io.BytesIO, this should probably be something more specific for what exactly the file-like object actually does, or possibly even typing.BinaryIO.
Similarly for other IO things.
Should flake8-pyi add some warnings in this area?