mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-11 15:49:12 +08:00
Improve stubs for sequence types (#6386)
This commit is contained in:
1 parent
6130c2459e
commit
98af7d667f
9 files changed
+32
-29
No files matched your search
@@ -13,6 +13,7 @@ from typing import (
|
||||
Union,
|
||||
overload,
|
||||
)
|
||||
from typing_extensions import SupportsIndex
|
||||
|
||||
from google.protobuf.descriptor import Descriptor
|
||||
from google.protobuf.internal.message_listener import MessageListener
|
||||
@@ -33,7 +34,7 @@ class BaseContainer(Sequence[_T]):
|
||||
def __repr__(self) -> str: ...
|
||||
def sort(self, *, key: Optional[Callable[[_T], Any]] = ..., reverse: bool = ...) -> None: ...
|
||||
@overload
|
||||
def __getitem__(self, key: int) -> _T: ...
|
||||
def __getitem__(self, key: SupportsIndex) -> _T: ...
|
||||
@overload
|
||||
def __getitem__(self, key: slice) -> List[_T]: ...
|
||||
|
||||
|
||||
Reference in new issue
Block a user