From ea2f5b63963f7bf281fad6f2d29b2b673826610e Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sat, 26 Sep 2020 10:04:30 -0500 Subject: [PATCH] canio: Correct type annotations of CAN.send, Listener.receive --- shared-bindings/canio/CAN.c | 2 +- shared-bindings/canio/Listener.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/shared-bindings/canio/CAN.c b/shared-bindings/canio/CAN.c index 6b7a3878eb..b1fe7d28ba 100644 --- a/shared-bindings/canio/CAN.c +++ b/shared-bindings/canio/CAN.c @@ -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. //| """ diff --git a/shared-bindings/canio/Listener.c b/shared-bindings/canio/Listener.c index 1aaa092178..7b0e59063c 100644 --- a/shared-bindings/canio/Listener.c +++ b/shared-bindings/canio/Listener.c @@ -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,