6565//| connections and also initiate connections."""
6666//|
6767
68- //| def __init__(self, ) :
68+ //| def __init__(self) -> None :
6969//| """You cannot create an instance of `_bleio.Adapter`.
7070//| Use `_bleio.adapter` to access the sole instance available."""
7171//| ...
7272//|
7373
74- //| enabled: Any = ...
74+ //| enabled: bool = ...
7575//| """State of the BLE adapter."""
7676//|
7777STATIC mp_obj_t bleio_adapter_get_enabled (mp_obj_t self ) {
@@ -95,7 +95,7 @@ const mp_obj_property_t bleio_adapter_enabled_obj = {
9595 (mp_obj_t )& mp_const_none_obj },
9696};
9797
98- //| address: Any = ...
98+ //| address: Address = ...
9999//| """MAC address of the BLE adapter. (read-only)"""
100100//|
101101STATIC mp_obj_t bleio_adapter_get_address (mp_obj_t self ) {
@@ -111,7 +111,7 @@ const mp_obj_property_t bleio_adapter_address_obj = {
111111 (mp_obj_t )& mp_const_none_obj },
112112};
113113
114- //| name: Any = ...
114+ //| name: str = ...
115115//| """name of the BLE adapter used once connected.
116116//| The name is "CIRCUITPY" + the last four hex digits of ``adapter.address``,
117117//| to make it easy to distinguish multiple CircuitPython boards."""
@@ -135,7 +135,7 @@ const mp_obj_property_t bleio_adapter_name_obj = {
135135 (mp_obj_t )& mp_const_none_obj },
136136};
137137
138- //| def start_advertising(self, data: buf, *, scan_response: buf = None, connectable: bool = True, anonymous: bool = False, timeout: int = 0, interval: float = 0.1) -> Any :
138+ //| def start_advertising(self, data: buf, *, scan_response: buf = None, connectable: bool = True, anonymous: bool = False, timeout: int = 0, interval: float = 0.1) -> None :
139139//| """Starts advertising until `stop_advertising` is called or if connectable, another device
140140//| connects to us.
141141//|
@@ -202,7 +202,7 @@ STATIC mp_obj_t bleio_adapter_start_advertising(mp_uint_t n_args, const mp_obj_t
202202}
203203STATIC MP_DEFINE_CONST_FUN_OBJ_KW (bleio_adapter_start_advertising_obj , 2 , bleio_adapter_start_advertising );
204204
205- //| def stop_advertising(self, ) -> Any :
205+ //| def stop_advertising(self) -> None :
206206//| """Stop sending advertising packets."""
207207//| ...
208208//|
@@ -215,7 +215,7 @@ STATIC mp_obj_t bleio_adapter_stop_advertising(mp_obj_t self_in) {
215215}
216216STATIC MP_DEFINE_CONST_FUN_OBJ_1 (bleio_adapter_stop_advertising_obj , bleio_adapter_stop_advertising );
217217
218- //| def start_scan(self, prefixes: sequence = b"", *, buffer_size: int = 512, extended: bool = False, timeout: float = None, interval: float = 0.1, window: float = 0.1, minimum_rssi: int = -80, active: bool = True) -> Any :
218+ //| def start_scan(self, prefixes: sequence = b"", *, buffer_size: int = 512, extended: bool = False, timeout: float = None, interval: float = 0.1, window: float = 0.1, minimum_rssi: int = -80, active: bool = True) -> iterable :
219219//| """Starts a BLE scan and returns an iterator of results. Advertisements and scan responses are
220220//| filtered and returned separately.
221221//|
@@ -288,7 +288,7 @@ STATIC mp_obj_t bleio_adapter_start_scan(size_t n_args, const mp_obj_t *pos_args
288288}
289289STATIC MP_DEFINE_CONST_FUN_OBJ_KW (bleio_adapter_start_scan_obj , 1 , bleio_adapter_start_scan );
290290
291- //| def stop_scan(self, ) -> Any :
291+ //| def stop_scan(self) -> None :
292292//| """Stop the current scan."""
293293//| ...
294294//|
@@ -301,7 +301,7 @@ STATIC mp_obj_t bleio_adapter_stop_scan(mp_obj_t self_in) {
301301}
302302STATIC MP_DEFINE_CONST_FUN_OBJ_1 (bleio_adapter_stop_scan_obj , bleio_adapter_stop_scan );
303303
304- //| advertising: Any = ...
304+ //| advertising: bool = ...
305305//| """True when the adapter is currently advertising. (read-only)"""
306306//|
307307STATIC mp_obj_t bleio_adapter_get_advertising (mp_obj_t self ) {
@@ -317,7 +317,7 @@ const mp_obj_property_t bleio_adapter_advertising_obj = {
317317 (mp_obj_t )& mp_const_none_obj },
318318};
319319
320- //| connected: Any = ...
320+ //| connected: bool = ...
321321//| """True when the adapter is connected to another device regardless of who initiated the
322322//| connection. (read-only)"""
323323//|
@@ -334,7 +334,7 @@ const mp_obj_property_t bleio_adapter_connected_obj = {
334334 (mp_obj_t )& mp_const_none_obj },
335335};
336336
337- //| connections: Any = ...
337+ //| connections: tuple = ...
338338//| """Tuple of active connections including those initiated through
339339//| :py:meth:`_bleio.Adapter.connect`. (read-only)"""
340340//|
@@ -350,7 +350,7 @@ const mp_obj_property_t bleio_adapter_connections_obj = {
350350 (mp_obj_t )& mp_const_none_obj },
351351};
352352
353- //| def connect(self, address: Address, *, timeout: float/int) -> Any :
353+ //| def connect(self, address: Address, *, timeout: float/int) -> Connection :
354354//| """Attempts a connection to the device with the given address.
355355//|
356356//| :param Address address: The address of the peripheral to connect to
@@ -380,7 +380,7 @@ STATIC mp_obj_t bleio_adapter_connect(mp_uint_t n_args, const mp_obj_t *pos_args
380380}
381381STATIC MP_DEFINE_CONST_FUN_OBJ_KW (bleio_adapter_connect_obj , 2 , bleio_adapter_connect );
382382
383- //| def erase_bonding(self, ) -> Any :
383+ //| def erase_bonding(self) -> None :
384384//| """Erase all bonding information stored in flash memory."""
385385//| ...
386386//|
0 commit comments