File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4848
4949// These are standard stream methods. Code is in py/stream.c.
5050//
51- //| def read(self, nbytes: Any = None) -> Any :
51+ //| def read(self, nbytes: int = None) -> Optional[bytes] :
5252//| """Read characters. If ``nbytes`` is specified then read at most that many
5353//| bytes. Otherwise, read everything that arrives until the connection
5454//| times out. Providing the number of bytes expected is highly recommended
5858//| :rtype: bytes or None"""
5959//| ...
6060//|
61- //| def readinto(self, buf: Any , nbytes: Any = None) -> Any :
61+ //| def readinto(self, buf: WriteableBuffer , nbytes: int = None) -> Optional[bytes] :
6262//| """Read bytes into the ``buf``. If ``nbytes`` is specified then read at most
6363//| that many bytes. Otherwise, read at most ``len(buf)`` bytes.
6464//|
Original file line number Diff line number Diff line change 4747
4848// These are standard stream methods. Code is in py/stream.c.
4949//
50- //| def write(self, buf: Any ) -> Any :
50+ //| def write(self, buf: ReadableBuffer ) -> Optional[int] :
5151//| """Write the buffer of bytes to the bus.
5252//|
5353//| :return: the number of bytes written
You can’t perform that action at this time.
0 commit comments