mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
All instance attributes on memoryview are read-only (#6878)
* All instance attributes on `memoryview` are read-only * [pre-commit.ci] auto fixes from pre-commit.com hooks Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -649,19 +649,30 @@ class bytearray(MutableSequence[int], ByteString):
|
||||
|
||||
@final
|
||||
class memoryview(Sized, Sequence[int]):
|
||||
format: str
|
||||
itemsize: int
|
||||
shape: tuple[int, ...] | None
|
||||
strides: tuple[int, ...] | None
|
||||
suboffsets: tuple[int, ...] | None
|
||||
readonly: bool
|
||||
ndim: int
|
||||
|
||||
obj: bytes | bytearray
|
||||
c_contiguous: bool
|
||||
f_contiguous: bool
|
||||
contiguous: bool
|
||||
nbytes: int
|
||||
@property
|
||||
def format(self) -> str: ...
|
||||
@property
|
||||
def itemsize(self) -> int: ...
|
||||
@property
|
||||
def shape(self) -> tuple[int, ...] | None: ...
|
||||
@property
|
||||
def strides(self) -> tuple[int, ...] | None: ...
|
||||
@property
|
||||
def suboffsets(self) -> tuple[int, ...] | None: ...
|
||||
@property
|
||||
def readonly(self) -> bool: ...
|
||||
@property
|
||||
def ndim(self) -> int: ...
|
||||
@property
|
||||
def obj(self) -> bytes | bytearray: ...
|
||||
@property
|
||||
def c_contiguous(self) -> bool: ...
|
||||
@property
|
||||
def f_contiguous(self) -> bool: ...
|
||||
@property
|
||||
def contiguous(self) -> bool: ...
|
||||
@property
|
||||
def nbytes(self) -> int: ...
|
||||
def __init__(self, obj: ReadableBuffer) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(
|
||||
|
||||
Reference in New Issue
Block a user