Coverage for src/remedapy/range.py: 100%

1 from collections.abc import Callable, Iterable

2 from typing import TypeVar, overload

3

4 from .decorator import make_data_last

5

6 T = TypeVar('T')

7

8

9@overload

10 def range(end: int, /) -> Callable[[int], Iterable[int]]: ...

11

12

13@overload

14 def range(start: int, end: int, /) -> Iterable[int]: ...

15

16

17@make_data_last

18 def range(start: int, end: int, /) -> Iterable[int]:

19 current = start

20 while current < end:

21 yield current

22 current += 1