Skip to content

Commit caab710

Browse files
AlexWaygoodcdce8p
authored andcommitted
Revert typeshed ctypes change
The plugin provides superior type checking: #13987 (comment) A manual cherry-pick of e437cdf.
1 parent 3e885a5 commit caab710

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

mypy/typeshed/stdlib/_ctypes.pyi

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -324,12 +324,7 @@ class Array(_CData, Generic[_CT], metaclass=_PyCArrayType):
324324
@_type_.setter
325325
def _type_(self, value: type[_CT]) -> None: ...
326326

327-
# Note: only available if _CT == c_char
328-
@property
329-
def raw(self) -> bytes: ...
330-
@raw.setter
331-
def raw(self, value: ReadableBuffer) -> None: ...
332-
327+
raw: bytes # Note: only available if _CT == c_char
333328
value: Any # Note: bytes if _CT == c_char, str if _CT == c_wchar, unavailable otherwise
334329
# TODO: These methods cannot be annotated correctly at the moment.
335330
# All of these "Any"s stand for the array's element type, but it's not possible to use _CT

0 commit comments

Comments
 (0)