Make FFI.buffer implement buffer protocol, mark dunder methods as positional-only (#14505)

This commit is contained in:
Andrew Stitcher
2025-08-04 19:50:41 -04:00
committed by GitHub
parent 5a5d6a7647
commit 32bc5fcbbe
+10 -9
View File
@@ -90,16 +90,17 @@ class _CDataBase:
class buffer:
__hash__: ClassVar[None] # type: ignore[assignment]
def __init__(self, *args, **kwargs) -> None: ...
def __delitem__(self, other) -> None: ...
def __eq__(self, other): ...
def __ge__(self, other): ...
def __getitem__(self, index): ...
def __gt__(self, other): ...
def __le__(self, other): ...
def __buffer__(self, flags: int, /) -> memoryview: ...
def __delitem__(self, other, /) -> None: ...
def __eq__(self, other, /): ...
def __ge__(self, other, /): ...
def __getitem__(self, index, /): ...
def __gt__(self, other, /): ...
def __le__(self, other, /): ...
def __len__(self) -> int: ...
def __lt__(self, other): ...
def __ne__(self, other): ...
def __setitem__(self, index, object) -> None: ...
def __lt__(self, other, /): ...
def __ne__(self, other, /): ...
def __setitem__(self, index, object, /) -> None: ...
# These aliases are to work around pyright complaints.
# Pyright doesn't like it when a class object is defined as an alias