mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-16 02:51:28 +08:00
Remove SupportsGetItem.__contains__ (#13541)
This commit is contained in:
1 parent
6d6e858e63
commit
96c3fe712a
1 file changed
+1
-4
@@ -151,11 +151,8 @@ class SupportsKeysAndGetItem(Protocol[_KT, _VT_co]):
|
||||
def keys(self) -> Iterable[_KT]: ...
|
||||
def __getitem__(self, key: _KT, /) -> _VT_co: ...
|
||||
|
||||
# This protocol is currently under discussion. Use SupportsContainsAndGetItem
|
||||
# instead, if you require the __contains__ method.
|
||||
# See https://github.com/python/typeshed/issues/11822.
|
||||
# stable
|
||||
class SupportsGetItem(Protocol[_KT_contra, _VT_co]):
|
||||
def __contains__(self, x: Any, /) -> bool: ...
|
||||
def __getitem__(self, key: _KT_contra, /) -> _VT_co: ...
|
||||
|
||||
# stable
|
||||
|
||||
Reference in new issue
Block a user