Skip to content

Commit

Permalink
Revert typeshed ctypes change
Browse files Browse the repository at this point in the history
Since the plugin provides superior type checking: #13987 (comment)
A manual cherry-pick of e437cdf.
AlexWaygood authored and JelleZijlstra committed Dec 1, 2023

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
1 parent bdcc90e commit 3e5d813
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions mypy/typeshed/stdlib/_ctypes.pyi
Original file line number Diff line number Diff line change
@@ -167,11 +167,7 @@ class Array(_CData, Generic[_CT]):
def _type_(self) -> type[_CT]: ...
@_type_.setter
def _type_(self, value: type[_CT]) -> None: ...
# Note: only available if _CT == c_char
@property
def raw(self) -> bytes: ...
@raw.setter
def raw(self, value: ReadableBuffer) -> None: ...
raw: bytes # Note: only available if _CT == c_char
value: Any # Note: bytes if _CT == c_char, str if _CT == c_wchar, unavailable otherwise
# TODO These methods cannot be annotated correctly at the moment.
# All of these "Any"s stand for the array's element type, but it's not possible to use _CT

0 comments on commit 3e5d813

Please sign in to comment.