Make more miscellaneous fields read-only, annotate _json.make_encoder (#7439)

This commit is contained in:
Alex Waygood
2022-03-06 23:41:49 +00:00
committed by GitHub
parent 6cdecae6f9
commit bc72b25a2a
7 changed files with 63 additions and 31 deletions

View File

@@ -13,8 +13,10 @@ _T = TypeVar("_T", int, float, str)
typecodes: str
class array(MutableSequence[_T], Generic[_T]):
typecode: _TypeCode
itemsize: int
@property
def typecode(self) -> _TypeCode: ...
@property
def itemsize(self) -> int: ...
@overload
def __init__(self: array[int], __typecode: _IntTypeCode, __initializer: bytes | Iterable[_T] = ...) -> None: ...
@overload