Skip to content

Commit

Permalink
Fix intransitive subtyping issue with SupportsGetItem
Browse files Browse the repository at this point in the history
See python/mypy#13713 for details
  • Loading branch information
hauntsaninja committed Sep 23, 2022
1 parent 97c935a commit 9ef2937
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion stdlib/_typeshed/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ class SupportsKeysAndGetItem(Protocol[_KT, _VT_co]):
def __getitem__(self, __key: _KT) -> _VT_co: ...

# stable
class SupportsGetItem(Container[_KT_contra], Protocol[_KT_contra, _VT_co]):
class SupportsGetItem(Protocol[_KT_contra, _VT_co]):
def __contains__(self, __x: object) -> bool: ...
def __getitem__(self, __key: _KT_contra) -> _VT_co: ...

# stable
Expand Down

0 comments on commit 9ef2937

Please # to comment.