mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-03 08:23:47 +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:
1 parent
77f21e415b
commit
e80b25d1be
1 file changed
+6
@@ -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