Improve None as predicate for Python 2 ifilter (#8191)

This commit is contained in:
David Askari
2022-06-28 14:29:42 +02:00
committed by GitHub
parent 544c7c9633
commit 2ffa756bb5

View File

@@ -22,7 +22,10 @@ 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: Callable[[_T], Any] | None, iterable: Iterable[_T]) -> Iterator[_T]: ...
@overload
def ifilter(predicate: None, iterable: Iterable[_T | None]) -> Iterator[_T]: ...
@overload
def ifilter(predicate: Callable[[_T], Any], 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]]]: ...