2323
2424"""
2525try :
26- from typing import Optional
26+ from typing import Optional , Tuple
2727 import _bleio
2828 from circuitpython_typing import ReadableBuffer
2929except ImportError :
@@ -79,7 +79,7 @@ def matches(cls, entry: _bleio.ScanEntry) -> bool:
7979 )
8080
8181 @property
82- def msg (self ) -> bytes :
82+ def msg (self ) -> ReadableBuffer :
8383 """Raw radio data"""
8484 if _RADIO_DATA_ID not in self .manufacturer_data .data :
8585 return b""
@@ -112,7 +112,7 @@ def __init__(self, **args):
112112 # Handle user related configuration.
113113 self .configure (** args )
114114
115- def configure (self , channel : int = 42 ) -> ValueError :
115+ def configure (self , channel : int = 42 ) -> None :
116116 """
117117 Set configuration values for the radio.
118118
@@ -152,7 +152,7 @@ def send_bytes(self, message: bytes) -> None:
152152 time .sleep (AD_DURATION )
153153 self .ble .stop_advertising ()
154154
155- def receive (self , timeout : float = 1.0 ) -> Optional [ str ] :
155+ def receive (self , timeout : float = 1.0 ) -> str :
156156 """
157157 Returns a message received on the channel on which the radio is
158158 listening.
@@ -168,7 +168,7 @@ def receive(self, timeout: float = 1.0) -> Optional[str]:
168168
169169 def receive_full (
170170 self , timeout : float = 1.0
171- ) -> Optional [tuple [ReadableBuffer , int , float ]]:
171+ ) -> Optional [Tuple [ReadableBuffer , int , float ]]:
172172 """
173173 Returns a tuple containing three values representing a message received
174174 on the channel on which the radio is listening. If no message was
0 commit comments