Skip to content

Commit

Permalink
Add missing memoryview.nbytes attribute.
Browse files Browse the repository at this point in the history
Fixes #1225.

PiperOrigin-RevId: 454183699
  • Loading branch information
rchen152 committed Jun 10, 2022
1 parent 03295c0 commit cdc0c22
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions pytype/stubs/builtins/builtins.pytd
Original file line number Diff line number Diff line change
Expand Up @@ -941,13 +941,14 @@ class slice(object):

class memoryview(object):
__slots__ = []
format = ... # type: str
itemsize = ... # type: int
shape = ... # type: Optional[Tuple[int, ...]]
strides = ... # type: Optional[Tuple[int, ...]]
suboffsets = ... # type: Optional[Tuple[int, ...]]
readonly = ... # type: bool
ndim = ... # type: int
format: str
itemsize: int
nbytes: int
shape: Optional[Tuple[int, ...]]
strides: Optional[Tuple[int, ...]]
suboffsets: Optional[Tuple[int, ...]]
readonly: bool
ndim: int
def __init__(self, object: bytes) -> NoneType: ...
def __getitem__(self, index: int) -> int: ...
def __getitem__(self, index: slice) -> memoryview: ...
Expand Down

0 comments on commit cdc0c22

Please sign in to comment.