cffi: improve getitem and setitem (#9968)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
Francesc Elies
2023-04-27 08:14:54 +03:00
committed by GitHub
parent 2dd268d74a
commit ca3611238b

View File

@@ -3,7 +3,7 @@ import types
from _typeshed import Incomplete, ReadableBuffer, WriteableBuffer
from collections.abc import Callable, Hashable
from typing import Any, ClassVar, Protocol, TypeVar, overload
from typing_extensions import Literal, TypeAlias, final
from typing_extensions import Literal, SupportsIndex, TypeAlias, final
_T = TypeVar("_T")
@@ -72,7 +72,7 @@ class _CDataBase:
def __exit__(self, type: type[BaseException] | None, value: BaseException | None, traceback: types.TracebackType | None): ...
def __float__(self) -> float: ...
def __ge__(self, other): ...
def __getitem__(self, index): ...
def __getitem__(self, index: SupportsIndex | slice): ...
def __gt__(self, other): ...
def __hash__(self) -> int: ...
def __int__(self) -> int: ...
@@ -83,7 +83,7 @@ class _CDataBase:
def __ne__(self, other): ...
def __radd__(self, other): ...
def __rsub__(self, other): ...
def __setitem__(self, index, object) -> None: ...
def __setitem__(self, index: SupportsIndex | slice, object: Incomplete) -> None: ...
def __sub__(self, other): ...
@final