Skip to content

aiofiles: looping over file doesn't work #5725

Description

@Akuli
importasynciofrompathlibimportPathimportaiofilesFILENAME=Path.home() /".zshrc"asyncdefmain() ->None:
asyncwithaiofiles.open(FILENAME, "r") asinput_fd:
asyncforlineininput_fd:
print(line)
if__name__=='__main__':
asyncio.run(main())
scratch.py:10: error: "Coroutine[Any, Any, Iterator[str]]" has no attribute "__anext__"
Found 1 error in 1 file (checked 1 source file)

Originally reported at Tinche/aiofiles#105

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions