summaryrefslogtreecommitdiff
path: root/shared-bindings/_bleio/CharacteristicBuffer.c
diff options
context:
space:
mode:
authordherrada <dylan.herrada@adafruit.com>2020-07-02 14:11:25 -0400
committerdherrada <dylan.herrada@adafruit.com>2020-07-02 14:11:25 -0400
commit26f1fd00719ef0c5dc904e9b6f03ad2a90e2abdc (patch)
tree48c99ba0bf0423468355a3e730f4823522e3e572 /shared-bindings/_bleio/CharacteristicBuffer.c
parent54cb1feea04c0c93afe40868bc050ff7f645c61e (diff)
Added type hints to _bleio
Diffstat (limited to 'shared-bindings/_bleio/CharacteristicBuffer.c')
-rw-r--r--shared-bindings/_bleio/CharacteristicBuffer.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/shared-bindings/_bleio/CharacteristicBuffer.c b/shared-bindings/_bleio/CharacteristicBuffer.c
index 6cbd587c6..ee5a8ea33 100644
--- a/shared-bindings/_bleio/CharacteristicBuffer.c
+++ b/shared-bindings/_bleio/CharacteristicBuffer.c
@@ -100,7 +100,7 @@ STATIC void check_for_deinit(bleio_characteristic_buffer_obj_t *self) {
// These are standard stream methods. Code is in py/stream.c.
//
-//| def read(self, nbytes: Any = None) -> Any:
+//| def read(self, nbytes: int = None) -> Optional[bytes]:
//| """Read characters. If ``nbytes`` is specified then read at most that many
//| bytes. Otherwise, read everything that arrives until the connection
//| times out. Providing the number of bytes expected is highly recommended
@@ -110,14 +110,14 @@ STATIC void check_for_deinit(bleio_characteristic_buffer_obj_t *self) {
//| :rtype: bytes or None"""
//| ...
//|
-//| def readinto(self, buf: Any) -> Any:
+//| def readinto(self, buf: Union[bytearray, memoryview]) -> Optional[int]:
//| """Read bytes into the ``buf``. Read at most ``len(buf)`` bytes.
//|
//| :return: number of bytes read and stored into ``buf``
//| :rtype: int or None (on a non-blocking error)"""
//| ...
//|
-//| def readline(self, ) -> Any:
+//| def readline(self) -> bytes:
//| """Read a line, ending in a newline character.
//|
//| :return: the line read
@@ -167,7 +167,7 @@ STATIC mp_uint_t bleio_characteristic_buffer_ioctl(mp_obj_t self_in, mp_uint_t r
return ret;
}
-//| in_waiting: Any = ...
+//| in_waiting: int = ...
//| """The number of bytes in the input buffer, available to be read"""
//|
STATIC mp_obj_t bleio_characteristic_buffer_obj_get_in_waiting(mp_obj_t self_in) {
@@ -184,7 +184,7 @@ const mp_obj_property_t bleio_characteristic_buffer_in_waiting_obj = {
(mp_obj_t)&mp_const_none_obj},
};
-//| def reset_input_buffer(self, ) -> Any:
+//| def reset_input_buffer(self) -> None:
//| """Discard any unread characters in the input buffer."""
//| ...
//|
@@ -196,7 +196,7 @@ STATIC mp_obj_t bleio_characteristic_buffer_obj_reset_input_buffer(mp_obj_t self
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_characteristic_buffer_reset_input_buffer_obj, bleio_characteristic_buffer_obj_reset_input_buffer);
-//| def deinit(self, ) -> Any:
+//| def deinit(self) -> None:
//| """Disable permanently."""
//| ...
//|