mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Added Optional[] around the itertools.groupby() key attribute to allow None to pass the type (#2790)
Fixes #2788
This commit is contained in:
committed by
Sebastian Rittau
parent
ca62cecd14
commit
9b545a01ab
@@ -38,7 +38,7 @@ def filterfalse(predicate: Optional[Predicate[_T]],
|
||||
def groupby(iterable: Iterable[_T]) -> Iterator[Tuple[_T, Iterator[_T]]]: ...
|
||||
@overload
|
||||
def groupby(iterable: Iterable[_T],
|
||||
key: Callable[[_T], _S]) -> Iterator[Tuple[_S, Iterator[_T]]]: ...
|
||||
key: Optional[Callable[[_T], _S]]) -> Iterator[Tuple[_S, Iterator[_T]]]: ...
|
||||
|
||||
@overload
|
||||
def islice(iterable: Iterable[_T], stop: Optional[int]) -> Iterator[_T]: ...
|
||||
|
||||
Reference in New Issue
Block a user