mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Stdlib: add 'obvious' default values (#9688)
This commit is contained in:
@@ -51,7 +51,7 @@ class repeat(Iterator[_T], Generic[_T]):
|
||||
class accumulate(Iterator[_T], Generic[_T]):
|
||||
if sys.version_info >= (3, 8):
|
||||
@overload
|
||||
def __init__(self, iterable: Iterable[_T], func: None = ..., *, initial: _T | None = ...) -> None: ...
|
||||
def __init__(self, iterable: Iterable[_T], func: None = None, *, initial: _T | None = ...) -> None: ...
|
||||
@overload
|
||||
def __init__(self, iterable: Iterable[_S], func: Callable[[_T, _S], _T], *, initial: _T | None = ...) -> None: ...
|
||||
else:
|
||||
@@ -87,7 +87,7 @@ class filterfalse(Iterator[_T], Generic[_T]):
|
||||
|
||||
class groupby(Iterator[tuple[_T, Iterator[_S]]], Generic[_T, _S]):
|
||||
@overload
|
||||
def __new__(cls, iterable: Iterable[_T1], key: None = ...) -> groupby[_T1, _T1]: ...
|
||||
def __new__(cls, iterable: Iterable[_T1], key: None = None) -> groupby[_T1, _T1]: ...
|
||||
@overload
|
||||
def __new__(cls, iterable: Iterable[_T1], key: Callable[[_T1], _T2]) -> groupby[_T2, _T1]: ...
|
||||
def __iter__(self: Self) -> Self: ...
|
||||
|
||||
Reference in New Issue
Block a user