From bf9f329a6196982700512e3f5f9a7c4c765ff9b2 Mon Sep 17 00:00:00 2001 From: Alec Delaney <89490472+tekktrik@users.noreply.github.com> Date: Tue, 30 Aug 2022 11:12:47 -0400 Subject: [PATCH 1/2] Fix UART.readline docstring --- shared-bindings/busio/UART.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shared-bindings/busio/UART.c b/shared-bindings/busio/UART.c index baa7f2cdba..2d14fec07f 100644 --- a/shared-bindings/busio/UART.c +++ b/shared-bindings/busio/UART.c @@ -222,8 +222,9 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(busio_uart___exit___obj, 4, 4, busio_ //| def readline(self) -> bytes: //| """Read a line, ending in a newline character, or -//| return None if a timeout occurs sooner, or -//| return everything readable if no newline is found and timeout=0 +//| return ``None`` if a timeout occurs sooner, or +//| return everything readable if no newline is found and +//| ``timeout=0`` //| //| :return: the line read //| :rtype: bytes or None""" From 0d8dab73810faf4a65f79073eca0f46cc781cfaa Mon Sep 17 00:00:00 2001 From: Alec Delaney <89490472+tekktrik@users.noreply.github.com> Date: Tue, 30 Aug 2022 11:18:06 -0400 Subject: [PATCH 2/2] Update write() function definition --- shared-bindings/busio/UART.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/busio/UART.c b/shared-bindings/busio/UART.c index 2d14fec07f..60f2b407fe 100644 --- a/shared-bindings/busio/UART.c +++ b/shared-bindings/busio/UART.c @@ -231,7 +231,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(busio_uart___exit___obj, 4, 4, busio_ //| ... //| -//| def write(self, buf: WriteableBuffer) -> Optional[int]: +//| def write(self, buf: ReadableBuffer) -> Optional[int]: //| """Write the buffer of bytes to the bus. //| //| *New in CircuitPython 4.0:* ``buf`` must be bytes, not a string.