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:
Jelle Zijlstra
2017-02-11 10:10:13 -08:00
committed by Guido van Rossum
parent 77f21e415b
commit e80b25d1be

View File

@@ -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: ...