---
source: crates/ruff_linter/src/rules/flake8_pyi/mod.rs
---
PYI045.py:12:27: PYI045 `__iter__` methods should return an `Iterator`, not an `Iterable`
   |
11 | class TypingIterableTReturn:
12 |     def __iter__(self) -> typing.Iterable[int]:
   |                           ^^^^^^^^^^^^^^^^^^^^ PYI045
13 |         ...
   |

PYI045.py:20:27: PYI045 `__iter__` methods should return an `Iterator`, not an `Iterable`
   |
19 | class TypingIterableReturn:
20 |     def __iter__(self) -> typing.Iterable:
   |                           ^^^^^^^^^^^^^^^ PYI045
21 |         ...
   |

PYI045.py:28:27: PYI045 `__iter__` methods should return an `Iterator`, not an `Iterable`
   |
27 | class CollectionsIterableTReturn:
28 |     def __iter__(self) -> collections.abc.Iterable[int]:
   |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI045
29 |         ...
   |

PYI045.py:36:27: PYI045 `__iter__` methods should return an `Iterator`, not an `Iterable`
   |
35 | class CollectionsIterableReturn:
36 |     def __iter__(self) -> collections.abc.Iterable:
   |                           ^^^^^^^^^^^^^^^^^^^^^^^^ PYI045
37 |         ...
   |

PYI045.py:44:27: PYI045 `__iter__` methods should return an `Iterator`, not an `Iterable`
   |
43 | class IterableReturn:
44 |     def __iter__(self) -> Iterable:
   |                           ^^^^^^^^ PYI045
45 |         ...
   |

PYI045.py:79:28: PYI045 `__aiter__` methods should return an `AsyncIterator`, not an `AsyncIterable`
   |
78 | class TypingAsyncIterableTReturn:
79 |     def __aiter__(self) -> typing.AsyncIterable[int]:
   |                            ^^^^^^^^^^^^^^^^^^^^^^^^^ PYI045
80 |         ...
   |

PYI045.py:84:28: PYI045 `__aiter__` methods should return an `AsyncIterator`, not an `AsyncIterable`
   |
83 | class TypingAsyncIterableReturn:
84 |     def __aiter__(self) -> typing.AsyncIterable:
   |                            ^^^^^^^^^^^^^^^^^^^^ PYI045
85 |         ...
   |


