Even after PR #4650, the stubs for aiofiles are incorrect.
The stubs still don't include wrapped methods for AsyncBufferedReader, AsyncBufferedIOBase, AsyncBufferedReader and AsyncFileIO. Something like this doesn't type check, since, according to current stubs, AsyncBufferedReader has no read method:
importaiofilesasyncdefprint_file(path: str) ->None:
asyncwithaiofiles.open(path, mode="r") asf:
print(awaitf.read())
And also, there's no aiofiles._os module, it should be aiofiles.os.
Even after PR #4650, the stubs for aiofiles are incorrect.
The stubs still don't include wrapped methods for AsyncBufferedReader, AsyncBufferedIOBase, AsyncBufferedReader and AsyncFileIO. Something like this doesn't type check, since, according to current stubs, AsyncBufferedReader has no read method:
And also, there's no
aiofiles._osmodule, it should beaiofiles.os.