mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-06-24 09:48:39 +08:00
Specialize plain slice type hints (#13007)
This commit is contained in:
@@ -443,10 +443,10 @@ class PrepareProtocol:
|
||||
class Row(Sequence[Any]):
|
||||
def __new__(cls, cursor: Cursor, data: tuple[Any, ...], /) -> Self: ...
|
||||
def keys(self) -> list[str]: ...
|
||||
@overload
|
||||
@overload # Note: really needs int instead of SupportsIndex
|
||||
def __getitem__(self, key: int | str, /) -> Any: ...
|
||||
@overload
|
||||
def __getitem__(self, key: slice, /) -> tuple[Any, ...]: ...
|
||||
@overload # Note: SupportsIndex does work within slices.
|
||||
def __getitem__(self, key: slice[SupportsIndex | None], /) -> tuple[Any, ...]: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __iter__(self) -> Iterator[Any]: ...
|
||||
def __len__(self) -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user