Switch to PEP-604 syntax in python2 stubs (#5915)

Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
This commit is contained in:
Oleg Höfling authored and GitHub committed 2021-08-14 11:12:30 +02:00
1 parent 431c4f7fc1
commit ff63953188
235 files changed
+2473 -2768

No files matched your search

+3 -3
View File
@@ -1,5 +1,5 @@
from _typeshed import SupportsLessThan
from typing import Callable, Iterable, List, Optional, TypeVar
from typing import Callable, Iterable, List, TypeVar
_T = TypeVar("_T")
@@ -10,6 +10,6 @@ def heappushpop(heap: List[_T], item: _T) -> _T: ...
def heapify(x: List[_T]) -> None: ...
def heapreplace(heap: List[_T], item: _T) -> _T: ...
def merge(*iterables: Iterable[_T]) -> Iterable[_T]: ...
def nlargest(n: int, iterable: Iterable[_T], key: Optional[Callable[[_T], SupportsLessThan]] = ...) -> List[_T]: ...
def nsmallest(n: int, iterable: Iterable[_T], key: Optional[Callable[[_T], SupportsLessThan]] = ...) -> List[_T]: ...
def nlargest(n: int, iterable: Iterable[_T], key: Callable[[_T], SupportsLessThan] | None = ...) -> List[_T]: ...
def nsmallest(n: int, iterable: Iterable[_T], key: Callable[[_T], SupportsLessThan] | None = ...) -> List[_T]: ...
def _heapify_max(__x: List[_T]) -> None: ... # undocumented