From 9bbb93cf69f81ea1fc33f223ff03cf2a1b604bc5 Mon Sep 17 00:00:00 2001 From: Jukka Lehtosalo Date: Mon, 23 Jan 2023 10:30:54 +0000 Subject: [PATCH] Typeshed cherry-pick: Add __eq__ to types.MappingProxyType (#9580) (#14507) This fixes a false positive when using `--strict-equality`. See https://github.com/python/typeshed/commit/d5b88c552cd7530b598b6369fef66bda745de93d for context. --- mypy/typeshed/stdlib/types.pyi | 1 + 1 file changed, 1 insertion(+) diff --git a/mypy/typeshed/stdlib/types.pyi b/mypy/typeshed/stdlib/types.pyi index 6928032f92b1..e3e6418347b1 100644 --- a/mypy/typeshed/stdlib/types.pyi +++ b/mypy/typeshed/stdlib/types.pyi @@ -310,6 +310,7 @@ class MappingProxyType(Mapping[_KT, _VT_co], Generic[_KT, _VT_co]): def __getitem__(self, __key: _KT) -> _VT_co: ... def __iter__(self) -> Iterator[_KT]: ... def __len__(self) -> int: ... + def __eq__(self, other: object) -> bool: ... def copy(self) -> dict[_KT, _VT_co]: ... def keys(self) -> KeysView[_KT]: ... def values(self) -> ValuesView[_VT_co]: ...