Stubtest fixes (#5249)

This commit is contained in:
hatal175 authored and GitHub committed 2021-04-25 21:56:54 -07:00
1 parent 761bd6e6b4
commit d151d1b8bb
3 files changed
+23 -40

No files matched your search

+5 -5
View File
@@ -1,5 +1,5 @@
import sys
from typing import Any, Dict, Generic, List, Optional, Tuple, Type, TypeVar, Union, overload
from typing import Any, Dict, Generic, List, NoReturn, Optional, Tuple, Type, TypeVar, Union, overload
if sys.version_info >= (3, 10):
from typing import (
@@ -190,7 +190,6 @@ class deque(MutableSequence[_T], Generic[_T]):
def __len__(self) -> int: ...
def __iter__(self) -> Iterator[_T]: ...
def __str__(self) -> str: ...
def __hash__(self) -> int: ...
# These methods of deque don't really take slices, but we need to
# define them as taking a slice to satisfy MutableSequence.
@overload
@@ -222,6 +221,8 @@ class Counter(Dict[_T, int], Generic[_T]):
def copy(self: _S) -> _S: ...
def elements(self) -> Iterator[_T]: ...
def most_common(self, n: Optional[int] = ...) -> List[Tuple[_T, int]]: ...
@classmethod
def fromkeys(cls, iterable: Any, v: Optional[int] = ...) -> NoReturn: ... # type: ignore
@overload
def subtract(self, __iterable: None = ...) -> None: ...
@overload
@@ -291,10 +292,9 @@ class defaultdict(Dict[_KT, _VT], Generic[_KT, _VT]):
def copy(self: _S) -> _S: ...
class ChainMap(MutableMapping[_KT, _VT], Generic[_KT, _VT]):
maps: List[Mapping[_KT, _VT]]
def __init__(self, *maps: Mapping[_KT, _VT]) -> None: ...
@property
def maps(self) -> List[Mapping[_KT, _VT]]: ...
def new_child(self, m: Mapping[_KT, _VT] = ...) -> ChainMap[_KT, _VT]: ...
def new_child(self, m: Optional[Mapping[_KT, _VT]] = ...) -> ChainMap[_KT, _VT]: ...
@property
def parents(self) -> ChainMap[_KT, _VT]: ...
def __setitem__(self, k: _KT, v: _VT) -> None: ...