mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Make Struct.size and format read-only properties (#8670)
attribute 'size' of '_struct.Struct' objects is not writable
This commit is contained in:
committed by
GitHub
parent
4a4acdb30a
commit
1195bbaf33
@@ -14,8 +14,10 @@ def iter_unpack(__format: str | bytes, __buffer: ReadableBuffer) -> Iterator[tup
|
||||
def calcsize(__format: str | bytes) -> int: ...
|
||||
|
||||
class Struct:
|
||||
format: str
|
||||
size: int
|
||||
@property
|
||||
def format(self) -> str: ...
|
||||
@property
|
||||
def size(self) -> int: ...
|
||||
def __init__(self, format: str | bytes) -> None: ...
|
||||
def pack(self, *v: Any) -> bytes: ...
|
||||
def pack_into(self, buffer: WriteableBuffer, offset: int, *v: Any) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user