Files
typeshed/stdlib/3
Denis Laxalde 0dd3258ed2 Add __aiter__ and __anext__ methods for asyncio.StreamReader (#4286)
The following code produces an error in mypy:

    import asyncio
    from asyncio.subprocess import PIPE

    async def main() -> None:
        proc = await asyncio.create_subprocess_shell("ls -l", stdout=PIPE)
        assert proc.stdout is not None
        async for line in proc.stdout:
            print(line.decode())
        await proc.wait()

    asyncio.run(main())

$ mypy --strict file.py
file.py:8: error: "StreamReader" has no attribute "__aiter__" (not async iterable)

This commits fixes this by adding __aiter__/__anext__ methods that are
needed for async iterator protocol.
2020-06-28 11:57:49 -07:00
..
2020-06-09 12:20:09 +02:00
2019-10-29 19:52:05 -07:00
2020-06-11 09:10:52 +02:00
2020-06-11 09:10:52 +02:00
2020-06-26 20:49:50 +02:00
2019-07-27 10:58:21 +02:00
2020-01-21 17:52:38 -08:00
2020-06-10 20:57:09 -07:00
2020-02-29 22:03:50 -08:00
2020-05-16 16:51:13 -07:00
2017-04-30 14:16:30 -07:00
2020-02-05 19:14:30 -08:00
2020-02-21 11:55:11 +01:00
2020-02-21 11:57:07 +01:00
2018-08-18 19:25:48 -07:00
2020-06-11 09:10:52 +02:00
2020-02-21 21:23:34 -08:00
2020-03-06 11:02:18 +01:00
2019-07-27 10:58:21 +02:00
2020-03-06 11:12:24 +01:00