Skip to content

Fix positional-only differences in ctypes #7223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions stdlib/ctypes/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,13 @@ class pointer(Generic[_CT], _PointerLike, _CData):
contents: _CT
def __init__(self, arg: _CT = ...) -> None: ...
@overload
def __getitem__(self, i: int) -> _CT: ...
def __getitem__(self, __i: int) -> _CT: ...
@overload
def __getitem__(self, s: slice) -> list[_CT]: ...
def __getitem__(self, __s: slice) -> list[_CT]: ...
@overload
def __setitem__(self, i: int, o: _CT) -> None: ...
def __setitem__(self, __i: int, __o: _CT) -> None: ...
@overload
def __setitem__(self, s: slice, o: Iterable[_CT]) -> None: ...
def __setitem__(self, __s: slice, __o: Iterable[_CT]) -> None: ...

def resize(obj: _CData, size: int) -> None: ...
def set_errno(value: int) -> int: ...
Expand Down Expand Up @@ -294,13 +294,13 @@ class Array(Generic[_CT], _CData):
# the array element type would belong are annotated with Any instead.
def __init__(self, *args: Any) -> None: ...
@overload
def __getitem__(self, i: int) -> Any: ...
def __getitem__(self, __i: int) -> Any: ...
@overload
def __getitem__(self, s: slice) -> list[Any]: ...
def __getitem__(self, __s: slice) -> list[Any]: ...
@overload
def __setitem__(self, i: int, o: Any) -> None: ...
def __setitem__(self, __i: int, __o: Any) -> None: ...
@overload
def __setitem__(self, s: slice, o: Iterable[Any]) -> None: ...
def __setitem__(self, __s: slice, __o: Iterable[Any]) -> None: ...
def __iter__(self) -> Iterator[Any]: ...
# Can't inherit from Sized because the metaclass conflict between
# Sized and _CData prevents using _CDataMeta.
Expand Down