mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
cffi: improve getitem and setitem (#9968)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user