diff options
| author | Taku Fukada <naninunenor@gmail.com> | 2020-07-24 03:22:41 +0900 |
|---|---|---|
| committer | Taku Fukada <naninunenor@gmail.com> | 2020-07-24 18:20:03 +0900 |
| commit | 54a342a7f5b74f32c7a53ea483d9046e688b9830 (patch) | |
| tree | cbffe76818a71ffa52a8b7151baed21c0b387c5b /shared-bindings/nvm/ByteArray.c | |
| parent | 543708416bc19bc1e77d859d013c4757433ad255 (diff) | |
Add and correct some type hints
Diffstat (limited to 'shared-bindings/nvm/ByteArray.c')
| -rw-r--r-- | shared-bindings/nvm/ByteArray.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/shared-bindings/nvm/ByteArray.c b/shared-bindings/nvm/ByteArray.c index 278ac4d73..994ce7045 100644 --- a/shared-bindings/nvm/ByteArray.c +++ b/shared-bindings/nvm/ByteArray.c @@ -49,7 +49,8 @@ //| ... //| -//| def __bool__(self) -> bool: ... +//| def __bool__(self) -> bool: +//| ... //| //| def __len__(self) -> int: //| """Return the length. This is used by (`len`)""" @@ -70,6 +71,18 @@ STATIC const mp_rom_map_elem_t nvm_bytearray_locals_dict_table[] = { STATIC MP_DEFINE_CONST_DICT(nvm_bytearray_locals_dict, nvm_bytearray_locals_dict_table); +//| @overload +//| def __getitem__(self, index: slice) -> bytearray: ... +//| def __getitem__(self, index: int) -> int: +//| """Returns the value at the given index.""" +//| ... +//| +//| @overload +//| def __setitem__(self, index: slice, value: ReadableBuffer) -> None: ... +//| def __setitem__(self, index: int, value: int) -> None: +//| """Set the value at the given index.""" +//| ... +//| STATIC mp_obj_t nvm_bytearray_subscr(mp_obj_t self_in, mp_obj_t index_in, mp_obj_t value) { if (value == MP_OBJ_NULL) { // delete item |
