mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-24 20:12:08 +08:00
Switch to PEP-604 syntax in python2 stubs (#5915)
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from typing import Any, Callable, Generic, Iterable, Iterator, Optional, Sequence, Tuple, TypeVar, overload
|
||||
from typing import Any, Callable, Generic, Iterable, Iterator, Sequence, Tuple, TypeVar, overload
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_S = TypeVar("_S")
|
||||
@@ -21,16 +21,16 @@ class chain(Iterator[_T], Generic[_T]):
|
||||
|
||||
def compress(data: Iterable[_T], selectors: Iterable[Any]) -> Iterator[_T]: ...
|
||||
def dropwhile(predicate: Callable[[_T], Any], iterable: Iterable[_T]) -> Iterator[_T]: ...
|
||||
def ifilter(predicate: Optional[Callable[[_T], Any]], iterable: Iterable[_T]) -> Iterator[_T]: ...
|
||||
def ifilterfalse(predicate: Optional[Callable[[_T], Any]], iterable: Iterable[_T]) -> Iterator[_T]: ...
|
||||
def ifilter(predicate: Callable[[_T], Any] | None, iterable: Iterable[_T]) -> Iterator[_T]: ...
|
||||
def ifilterfalse(predicate: Callable[[_T], Any] | None, iterable: Iterable[_T]) -> Iterator[_T]: ...
|
||||
@overload
|
||||
def groupby(iterable: Iterable[_T], key: None = ...) -> Iterator[Tuple[_T, Iterator[_T]]]: ...
|
||||
@overload
|
||||
def groupby(iterable: Iterable[_T], key: Callable[[_T], _S]) -> Iterator[Tuple[_S, Iterator[_T]]]: ...
|
||||
@overload
|
||||
def islice(iterable: Iterable[_T], stop: Optional[int]) -> Iterator[_T]: ...
|
||||
def islice(iterable: Iterable[_T], stop: int | None) -> Iterator[_T]: ...
|
||||
@overload
|
||||
def islice(iterable: Iterable[_T], start: Optional[int], stop: Optional[int], step: Optional[int] = ...) -> Iterator[_T]: ...
|
||||
def islice(iterable: Iterable[_T], start: int | None, stop: int | None, step: int | None = ...) -> Iterator[_T]: ...
|
||||
|
||||
_T1 = TypeVar("_T1")
|
||||
_T2 = TypeVar("_T2")
|
||||
|
||||
Reference in New Issue
Block a user