Debian Codegraph @

jedi/third_party/typeshed/stdlib/heapq.pyi

raw symbols SCIP
1 import sys
2 from _heapq import *
3 from _typeshed import SupportsRichComparison
4 from collections.abc import Callable, Generator, Iterable
5 from typing import Any, Final, TypeVar
6
7 __all__ = ["heappush", "heappop", "heapify", "heapreplace", "merge", "nlargest", "nsmallest", "heappushpop"]
8
9 if sys.version_info >= (3, 14):
10 # Added to __all__ in 3.14.1
11 __all__ += ["heapify_max", "heappop_max", "heappush_max", "heappushpop_max", "heapreplace_max"]
12
13 _S = TypeVar("_S")
14
15 __about__: Final[str]
16
17 def merge(
18 *iterables: Iterable[_S], key: Callable[[_S], SupportsRichComparison] | None = None, reverse: bool = False
19 ) -> Generator[_S]: ...
20 def nlargest(n: int, iterable: Iterable[_S], key: Callable[[_S], SupportsRichComparison] | None = None) -> list[_S]: ...
21 def nsmallest(n: int, iterable: Iterable[_S], key: Callable[[_S], SupportsRichComparison] | None = None) -> list[_S]: ...
22 def _heapify_max(heap: list[Any], /) -> None: ... # undocumented