Skip to content

Commit ea2f5b6

Browse files
committed
canio: Correct type annotations of CAN.send, Listener.receive
1 parent f4fd5bb commit ea2f5b6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

shared-bindings/canio/CAN.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ STATIC const mp_obj_property_t canio_can_loopback_obj = {
324324
};
325325

326326

327-
//| def send(message: Message) -> None:
327+
//| def send(message: Union[RemoteTransmissionRequest, Message]) -> None:
328328
//| """Send a message on the bus with the given data and id.
329329
//| If the message could not be sent due to a full fifo or a bus error condition, RuntimeError is raised.
330330
//| """

shared-bindings/canio/Listener.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
//| `~canio.CAN.listen`."""
3939
//|
4040

41-
//| def receive(self) -> Optional[Message]:
41+
//| def receive(self) -> Optional[Union[RemoteTransmissionRequest,Message]]:
4242
//| """Reads a message, after waiting up to self.timeout seconds
4343
//|
4444
//| If no message is received in time, None is returned. Otherwise,

0 commit comments

Comments
 (0)