Skip to content

Invalid aiofiles stubs #4714

Closed
Closed
@MKuranowski

Description

@MKuranowski

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:

import aiofiles

async def print_file(path: str) -> None:
    async with aiofiles.open(path, mode="r") as f:
        print(await f.read())

And also, there's no aiofiles._os module, it should be aiofiles.os.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions