mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 12:14:27 +08:00
Add SupportsIndex stub to typing_extensions (#4442)
This was added to typing_extensions in python/typing#724.
This commit is contained in:
5
third_party/2and3/typing_extensions.pyi
vendored
5
third_party/2and3/typing_extensions.pyi
vendored
@@ -98,3 +98,8 @@ _AnnotatedAlias: Any = ... # undocumented
|
||||
|
||||
# TypeAlias is a (non-subscriptable) special form.
|
||||
class TypeAlias: ...
|
||||
|
||||
@runtime_checkable
|
||||
class SupportsIndex(Protocol, metaclass=abc.ABCMeta):
|
||||
@abc.abstractmethod
|
||||
def __index__(self) -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user