Skip to content

Commit f7799bb

Browse files
authored
Use Generator for heapq.merge (#13663)
1 parent e571017 commit f7799bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/heapq.pyi

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from _heapq import *
22
from _typeshed import SupportsRichComparison
3-
from collections.abc import Callable, Iterable
3+
from collections.abc import Callable, Generator, Iterable
44
from typing import Any, Final, TypeVar
55

66
__all__ = ["heappush", "heappop", "heapify", "heapreplace", "merge", "nlargest", "nsmallest", "heappushpop"]
@@ -11,7 +11,7 @@ __about__: Final[str]
1111

1212
def merge(
1313
*iterables: Iterable[_S], key: Callable[[_S], SupportsRichComparison] | None = None, reverse: bool = False
14-
) -> Iterable[_S]: ...
14+
) -> Generator[_S]: ...
1515
def nlargest(n: int, iterable: Iterable[_S], key: Callable[[_S], SupportsRichComparison] | None = None) -> list[_S]: ...
1616
def nsmallest(n: int, iterable: Iterable[_S], key: Callable[[_S], SupportsRichComparison] | None = None) -> list[_S]: ...
1717
def _heapify_max(heap: list[Any], /) -> None: ... # undocumented

0 commit comments

Comments
 (0)