From d78db6aefb766795c1c317f326ed9234feb69d5a Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Tue, 10 Dec 2019 13:25:06 +0100 Subject: [PATCH] doc/customdevices: use correct default argument Make it match the implementation. --- pybricks/customdevices.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pybricks/customdevices.py b/pybricks/customdevices.py index 3743d87..747c910 100644 --- a/pybricks/customdevices.py +++ b/pybricks/customdevices.py @@ -109,11 +109,11 @@ class UARTDevice(): baudrate (int): Baudrate of the UART device. timeout (:ref:`time`): How long to wait during :meth:`.read` before giving up. If you choose ``None``, - it will wait forever. (*Default*: ``None``) + it will wait forever (*Default*: ``None``). """ pass - def read(self, length): + def read(self, length=1): """Read a given number of bytes from the buffer. Your program will wait until the requested number of bytes are @@ -121,7 +121,7 @@ class UARTDevice(): exception is raised. Arguments: - length (``int``): How many bytes to read. + length (``int``): How many bytes to read (*Default*: 1). Returns: ``bytes``: Bytes returned from the device.