Clarify further; fix type error
This commit is contained in:
parent
1a6c021239
commit
24ac8152dd
|
@ -40,9 +40,7 @@
|
||||||
//|
|
//|
|
||||||
//| def __init__(self) -> None:
|
//| def __init__(self) -> None:
|
||||||
//| """You cannot create an instance of `usb_cdc.Serial`.
|
//| """You cannot create an instance of `usb_cdc.Serial`.
|
||||||
//|
|
//| The available instances are in the ``usb_cdc.serials`` tuple."""
|
||||||
//| Serial objects are pre-constructed for each CDC device in the USB
|
|
||||||
//| descriptor and are included in the ``usb_cdc.serials`` tuple."""
|
|
||||||
//| ...
|
//| ...
|
||||||
//|
|
//|
|
||||||
//| def read(self, size: int = 1) -> bytes:
|
//| def read(self, size: int = 1) -> bytes:
|
||||||
|
@ -63,21 +61,21 @@
|
||||||
//| :rtype: bytes"""
|
//| :rtype: bytes"""
|
||||||
//| ...
|
//| ...
|
||||||
//|
|
//|
|
||||||
//| def readline(self, size=-1) -> Optional[bytes]:
|
//| def readline(self, size: int = -1) -> Optional[bytes]:
|
||||||
//| r"""Read a line, ending in a newline character ("\\n"), or
|
//| r"""Read a line ending in a newline character ("\\n"), including the newline.
|
||||||
//| return everything readable if no newline is found and ``timeout`` is 0.
|
//| Return everything readable if no newline is found and ``timeout`` is 0.
|
||||||
//| Return ``None`` in case of error.
|
//| Return ``None`` in case of error.
|
||||||
//|
|
//|
|
||||||
//| This is a binary stream: the newline character "\\n" cannot be changed.
|
//| This is a binary stream: the newline character "\\n" cannot be changed.
|
||||||
//| If the host computer transmits "\\r" it will be included as part of the line.
|
//| If the host computer transmits "\\r" it will also be included as part of the line.
|
||||||
//|
|
//|
|
||||||
//| :param int size: maximum number of characters to read. ``-1`` means as many as possible.
|
//| :param int size: maximum number of characters to read. ``-1`` means as many as possible.
|
||||||
//| :return: the line read
|
//| :return: the line read
|
||||||
//| :rtype: bytes or None"""
|
//| :rtype: bytes or None"""
|
||||||
//| ...
|
//| ...
|
||||||
//|
|
//|
|
||||||
//| def readlines(self) -> list:
|
//| def readlines(self) -> List[Optional[bytes]]:
|
||||||
//| """Read multiple lines as a list, using `readline()`
|
//| """Read multiple lines as a list, using `readline()`.
|
||||||
//|
|
//|
|
||||||
//| .. warning:: If ``timeout`` is ``None``,
|
//| .. warning:: If ``timeout`` is ``None``,
|
||||||
//| `readlines()` will never return, because there is no way to indicate end of stream.
|
//| `readlines()` will never return, because there is no way to indicate end of stream.
|
||||||
|
|
Loading…
Reference in New Issue