Skip to content

Commit 96c3fe7

Browse files
authored
Remove SupportsGetItem.__contains__ (#13541)
1 parent 6d6e858 commit 96c3fe7

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

stdlib/_typeshed/__init__.pyi

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,8 @@ class SupportsKeysAndGetItem(Protocol[_KT, _VT_co]):
151151
def keys(self) -> Iterable[_KT]: ...
152152
def __getitem__(self, key: _KT, /) -> _VT_co: ...
153153

154-
# This protocol is currently under discussion. Use SupportsContainsAndGetItem
155-
# instead, if you require the __contains__ method.
156-
# See https://github.com/python/typeshed/issues/11822.
154+
# stable
157155
class SupportsGetItem(Protocol[_KT_contra, _VT_co]):
158-
def __contains__(self, x: Any, /) -> bool: ...
159156
def __getitem__(self, key: _KT_contra, /) -> _VT_co: ...
160157

161158
# stable

0 commit comments

Comments
 (0)