canio: Correct type annotations of CAN.send, Listener.receive

This commit is contained in:
Jeff Epler 2020-09-26 10:04:30 -05:00
parent f4fd5bbfc4
commit ea2f5b6396
2 changed files with 2 additions and 2 deletions

View File

@ -324,7 +324,7 @@ STATIC const mp_obj_property_t canio_can_loopback_obj = {
};
//| def send(message: Message) -> None:
//| def send(message: Union[RemoteTransmissionRequest, Message]) -> None:
//| """Send a message on the bus with the given data and id.
//| If the message could not be sent due to a full fifo or a bus error condition, RuntimeError is raised.
//| """

View File

@ -38,7 +38,7 @@
//| `~canio.CAN.listen`."""
//|
//| def receive(self) -> Optional[Message]:
//| def receive(self) -> Optional[Union[RemoteTransmissionRequest,Message]]:
//| """Reads a message, after waiting up to self.timeout seconds
//|
//| If no message is received in time, None is returned. Otherwise,