Use PEP 570 syntax in third party stubs (#11554)

This commit is contained in:
Shantanu
2024-03-10 06:11:43 -07:00
committed by GitHub
parent f94bbfbcc4
commit 88fa182253
97 changed files with 625 additions and 632 deletions
+2 -2
View File
@@ -16,8 +16,8 @@ from six import moves as moves
# TODO: We should switch to the _typeshed version of SupportsGetItem
# once mypy updates its vendored copy of typeshed and makes a new release
class _SupportsGetItem(Protocol[_KT_contra, _VT_co]):
def __contains__(self, __x: Any) -> bool: ...
def __getitem__(self, __key: _KT_contra) -> _VT_co: ...
def __contains__(self, x: Any, /) -> bool: ...
def __getitem__(self, key: _KT_contra, /) -> _VT_co: ...
_T = TypeVar("_T")
_K = TypeVar("_K")