Open
Description
Describe the Bug
from typing import Iterable, TypeVar, Iterator
_T = TypeVar("_T")
def f(start, iterable: Iterable[_T], step) -> Iterator[_T]:
next_i = start
for i, element in enumerate(iterable):
if i == next_i:
yield element # E: Type of yielded value `_T` is not assignable to declared return type `_T`
next_i += step
should not emit at error on yield element.
Sandbox Link
(Only applicable for extension issues) IDE Information
No response