Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e415a7f

Browse files
authored
Make ChainMap's new_child() and parents return subclass (#5922)
1 parent bfa1d04 commit e415a7f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

stdlib/collections/__init__.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,9 +286,9 @@ class defaultdict(Dict[_KT, _VT], Generic[_KT, _VT]):
286286
class ChainMap(MutableMapping[_KT, _VT], Generic[_KT, _VT]):
287287
maps: list[Mapping[_KT, _VT]]
288288
def __init__(self, *maps: Mapping[_KT, _VT]) -> None: ...
289-
def new_child(self, m: Mapping[_KT, _VT] | None = ...) -> ChainMap[_KT, _VT]: ...
289+
def new_child(self: Self, m: Mapping[_KT, _VT] | None = ...) -> Self: ...
290290
@property
291-
def parents(self) -> ChainMap[_KT, _VT]: ...
291+
def parents(self: Self) -> Self: ...
292292
def __setitem__(self, k: _KT, v: _VT) -> None: ...
293293
def __delitem__(self, v: _KT) -> None: ...
294294
def __getitem__(self, k: _KT) -> _VT: ...

0 commit comments

Comments
 (0)