stdlib: Add several missing __(deep)copy__ methods (#7242)

This commit is contained in:
Alex Waygood authored and GitHub committed 2022-02-16 18:57:41 -08:00
1 parent d869f2e5a3
commit 1091521f60
7 files changed
+26 -2

No files matched your search

+4
View File
@@ -46,6 +46,8 @@ class WeakValueDictionary(MutableMapping[_KT, _VT]):
def __contains__(self, o: object) -> bool: ...
def __iter__(self) -> Iterator[_KT]: ...
def copy(self) -> WeakValueDictionary[_KT, _VT]: ...
__copy__ = copy
def __deepcopy__(self: Self, memo: Any) -> Self: ...
# These are incompatible with Mapping
def keys(self) -> Iterator[_KT]: ... # type: ignore[override]
def values(self) -> Iterator[_VT]: ... # type: ignore[override]
@@ -84,6 +86,8 @@ class WeakKeyDictionary(MutableMapping[_KT, _VT]):
def __contains__(self, o: object) -> bool: ...
def __iter__(self) -> Iterator[_KT]: ...
def copy(self) -> WeakKeyDictionary[_KT, _VT]: ...
__copy__ = copy
def __deepcopy__(self: Self, memo: Any) -> Self: ...
# These are incompatible with Mapping
def keys(self) -> Iterator[_KT]: ... # type: ignore[override]
def values(self) -> Iterator[_VT]: ... # type: ignore[override]