mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-07 05:54:02 +08:00
Add heapq types (#14098)
This commit is contained in:
@@ -3,11 +3,6 @@
|
||||
# ====================================================================
|
||||
|
||||
_asyncio.all_tasks
|
||||
_heapq.heapify_max
|
||||
_heapq.heappop_max
|
||||
_heapq.heappush_max
|
||||
_heapq.heappushpop_max
|
||||
_heapq.heapreplace_max
|
||||
_imp.pyc_magic_number_token
|
||||
_thread.RLock.locked
|
||||
_thread.set_name
|
||||
|
||||
+10
-2
@@ -1,11 +1,19 @@
|
||||
import sys
|
||||
from typing import Any, Final, TypeVar
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_T = TypeVar("_T") # list items must be comparable
|
||||
|
||||
__about__: Final[str]
|
||||
|
||||
def heapify(heap: list[Any], /) -> None: ...
|
||||
def heapify(heap: list[Any], /) -> None: ... # list items must be comparable
|
||||
def heappop(heap: list[_T], /) -> _T: ...
|
||||
def heappush(heap: list[_T], item: _T, /) -> None: ...
|
||||
def heappushpop(heap: list[_T], item: _T, /) -> _T: ...
|
||||
def heapreplace(heap: list[_T], item: _T, /) -> _T: ...
|
||||
|
||||
if sys.version_info >= (3, 14):
|
||||
def heapify_max(heap: list[Any], /) -> None: ... # list items must be comparable
|
||||
def heappop_max(heap: list[_T], /) -> _T: ...
|
||||
def heappush_max(heap: list[_T], item: _T, /) -> None: ...
|
||||
def heappushpop_max(heap: list[_T], item: _T, /) -> _T: ...
|
||||
def heapreplace_max(heap: list[_T], item: _T, /) -> _T: ...
|
||||
|
||||
Reference in New Issue
Block a user