mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
allow instantiating ChainMap (#929)
A previous PR led mypy to refuse to instantiate ChainMap, because it had unimplemented abstract methods. This PR adds the abstract methods to the stub, which is enough to persuade mypy to allow instantiating ChainMap.
This commit is contained in:
committed by
Guido van Rossum
parent
77f21e415b
commit
e80b25d1be
@@ -180,3 +180,9 @@ if sys.version_info >= (3, 3):
|
||||
|
||||
@property
|
||||
def parents(self) -> ChainMap[_KT, _VT]: ...
|
||||
|
||||
def __setitem__(self, k: _KT, v: _VT) -> None: ...
|
||||
def __delitem__(self, v: _KT) -> None: ...
|
||||
def __getitem__(self, k: _KT) -> _VT: ...
|
||||
def __iter__(self) -> Iterator[_KT]: ...
|
||||
def __len__(self) -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user