Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add heapq types #14098

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
May 19, 2025
Prev Previous commit
Next Next commit
Remove python implementation
  • Loading branch information
StanFromIreland committed May 19, 2025
commit 0aa70f6f11dd53ee665e4db234fcd9258ca01b50
17 changes: 1 addition & 16 deletions 17 stdlib/heapq.pyi
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import sys

# from _heapq import *
from _heapq import *
from _typeshed import SupportsRichComparison
from collections.abc import Callable, Generator, Iterable
from typing import Any, Final, TypeVar

Check failure on line 4 in stdlib/heapq.pyi

View workflow job for this annotation

GitHub Actions / pyright: Run test cases (Linux, 3.13)

Import "Any" is not accessed (reportUnusedImport)

__all__ = ["heappush", "heappop", "heapify", "heapreplace", "merge", "nlargest", "nsmallest", "heappushpop"]

Expand All @@ -11,19 +9,6 @@

__about__: Final[str]

def heapify(heap: list[Any], /) -> None: ...
def heappop(heap: list[_S], /) -> _S: ...
def heappush(heap: list[_S], item: _S, /) -> None: ...
def heappushpop(heap: list[_S], item: _S, /) -> _S: ...
def heapreplace(heap: list[_S], item: _S, /) -> _S: ...

if sys.version_info >= (3, 14):
def heapify_max(heap: list[Any], /) -> None: ...
def heappop_max(heap: list[_S], /) -> _S: ...
def heappush_max(heap: list[_S], item: _S, /) -> None: ...
def heappushpop_max(heap: list[_S], item: _S, /) -> _S: ...
def heapreplace_max(heap: list[_S], item: _S, /) -> _S: ...

def merge(
*iterables: Iterable[_S], key: Callable[[_S], SupportsRichComparison] | None = None, reverse: bool = False
) -> Generator[_S]: ...
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.