mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
Counter: fix return value of most_common() (#1491)
https://docs.python.org/3/library/collections.html#collections.Counter.most_common https://docs.python.org/2/library/collections.html#collections.Counter.most_common
This commit is contained in:
committed by
Łukasz Langa
parent
00ddb1c84a
commit
be7490322b
@@ -67,7 +67,7 @@ class Counter(Dict[_T, int], Generic[_T]):
|
||||
@overload
|
||||
def __init__(self, iterable: Iterable[_T]) -> None: ...
|
||||
def elements(self) -> Iterator[_T]: ...
|
||||
def most_common(self, n: int = ...) -> List[_T]: ...
|
||||
def most_common(self, n: Optional[int] = ...) -> List[Tuple[_T, int]]: ...
|
||||
@overload
|
||||
def subtract(self, __mapping: Mapping[_T, int]) -> None: ...
|
||||
@overload
|
||||
|
||||
@@ -125,7 +125,7 @@ class Counter(Dict[_T, int], Generic[_T]):
|
||||
|
||||
def elements(self) -> Iterator[_T]: ...
|
||||
|
||||
def most_common(self, n: int = ...) -> List[_T]: ...
|
||||
def most_common(self, n: Optional[int] = ...) -> List[Tuple[_T, int]]: ...
|
||||
|
||||
@overload
|
||||
def subtract(self, __mapping: Mapping[_T, int]) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user