File tree 2 files changed +13
-2
lines changed
tests/stubtest_allowlists 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 1
1
import sys
2
2
from _typeshed import ReadableBuffer , WriteableBuffer
3
+ from abc import abstractmethod
3
4
from typing import (
4
5
Any ,
5
6
Callable ,
@@ -268,8 +269,16 @@ class BigEndianStructure(Structure): ...
268
269
class LittleEndianStructure (Structure ): ...
269
270
270
271
class Array (Generic [_CT ], _CData ):
271
- _length_ : int
272
- _type_ : Type [_CT ]
272
+ @property
273
+ @abstractmethod
274
+ def _length_ (self ) -> int : ...
275
+ @_length_ .setter
276
+ def _length_ (self , value : int ) -> None : ...
277
+ @property
278
+ @abstractmethod
279
+ def _type_ (self ) -> Type [_CT ]: ...
280
+ @_type_ .setter
281
+ def _type_ (self , value : Type [_CT ]) -> None : ...
273
282
raw : bytes # Note: only available if _CT == c_char
274
283
value : Any # Note: bytes if _CT == c_char, str if _CT == c_wchar, unavailable otherwise
275
284
# TODO These methods cannot be annotated correctly at the moment.
Original file line number Diff line number Diff line change @@ -73,6 +73,8 @@ csv.Dialect.lineterminator
73
73
csv.Dialect.quoting
74
74
csv.Dialect.skipinitialspace
75
75
ctypes.Array.__iter__ # mypy doesn't support using __getitem__ instead of __iter__ so this is here https://github.com/python/mypy/issues/2220
76
+ ctypes.Array._type_ # _type_ and _length_ are abstract, https://github.com/python/typeshed/pull/6361
77
+ ctypes.Array._length_
76
78
ctypes.CDLL._FuncPtr # None at class level but initialized in __init__ to this value
77
79
ctypes.memmove # CFunctionType
78
80
ctypes.memset # CFunctionType
You can’t perform that action at this time.
0 commit comments