Type and mark as final module-level dunders not meant to be overwritten in stdlib/ (#9709)

This commit is contained in:
Avasam
2023-02-12 11:15:20 -05:00
committed by GitHub
parent 35871f4222
commit a768744d51
8 changed files with 25 additions and 22 deletions

View File

@@ -2,12 +2,13 @@ from _heapq import *
from _typeshed import SupportsRichComparison
from collections.abc import Callable, Iterable
from typing import Any, TypeVar
from typing_extensions import Final
__all__ = ["heappush", "heappop", "heapify", "heapreplace", "merge", "nlargest", "nsmallest", "heappushpop"]
_S = TypeVar("_S")
__about__: str
__about__: Final[str]
def merge(
*iterables: Iterable[_S], key: Callable[[_S], SupportsRichComparison] | None = None, reverse: bool = False