mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-28 22:56:55 +08:00
Make ChainMap's new_child() and parents return subclass (#5922)
This commit is contained in:
@@ -286,9 +286,9 @@ class defaultdict(Dict[_KT, _VT], Generic[_KT, _VT]):
|
||||
class ChainMap(MutableMapping[_KT, _VT], Generic[_KT, _VT]):
|
||||
maps: list[Mapping[_KT, _VT]]
|
||||
def __init__(self, *maps: Mapping[_KT, _VT]) -> None: ...
|
||||
def new_child(self, m: Mapping[_KT, _VT] | None = ...) -> ChainMap[_KT, _VT]: ...
|
||||
def new_child(self: Self, m: Mapping[_KT, _VT] | None = ...) -> Self: ...
|
||||
@property
|
||||
def parents(self) -> ChainMap[_KT, _VT]: ...
|
||||
def parents(self: Self) -> Self: ...
|
||||
def __setitem__(self, k: _KT, v: _VT) -> None: ...
|
||||
def __delitem__(self, v: _KT) -> None: ...
|
||||
def __getitem__(self, k: _KT) -> _VT: ...
|
||||
|
||||
Reference in New Issue
Block a user