mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-30 16:14:24 +08:00
Add __new__ to builtin dict (#1056)
This commit is contained in:
committed by
Jelle Zijlstra
parent
a74c31270d
commit
78d0cc32df
@@ -8,7 +8,7 @@ from typing import (
|
||||
Sequence, Mapping, Tuple, List, Any, Dict, Callable, Generic, Set,
|
||||
AbstractSet, FrozenSet, Sized, Reversible, SupportsInt, SupportsFloat, SupportsAbs,
|
||||
SupportsRound, IO, BinaryIO, Union, AnyStr, MutableSequence, MutableMapping,
|
||||
MutableSet, ItemsView, KeysView, ValuesView, Optional, Container,
|
||||
MutableSet, ItemsView, KeysView, ValuesView, Optional, Container, Type
|
||||
)
|
||||
from abc import abstractmethod, ABCMeta
|
||||
from mypy_extensions import NoReturn
|
||||
@@ -555,6 +555,8 @@ class dict(MutableMapping[_KT, _VT], Generic[_KT, _VT]):
|
||||
@overload
|
||||
def __init__(self, iterable: Iterable[Tuple[_KT, _VT]], **kwargs: _VT) -> None: ...
|
||||
|
||||
def __new__(cls: Type[_T1], *args: Any, **kwargs: Any) -> _T1: ...
|
||||
|
||||
def has_key(self, k: _KT) -> bool: ...
|
||||
def clear(self) -> None: ...
|
||||
def copy(self) -> Dict[_KT, _VT]: ...
|
||||
|
||||
Reference in New Issue
Block a user