Specialize plain slice type hints (#13007)

This commit is contained in:
Randolf Scholz authored and GitHub committed 2026-01-23 10:35:39 +01:00
1 parent 2ff920f291
commit 5c49b1fe49
15 files changed
+69 -69

No files matched your search

+3 -3
View File
@@ -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: ...