Added type hints to usb_midi
This commit is contained in:
parent
e089862a6c
commit
9c842c5a67
@ -48,7 +48,7 @@
|
||||
|
||||
// These are standard stream methods. Code is in py/stream.c.
|
||||
//
|
||||
//| def read(self, nbytes: Any = None) -> Any:
|
||||
//| def read(self, nbytes: int = None) -> Optional[bytes]:
|
||||
//| """Read characters. If ``nbytes`` is specified then read at most that many
|
||||
//| bytes. Otherwise, read everything that arrives until the connection
|
||||
//| times out. Providing the number of bytes expected is highly recommended
|
||||
@ -58,7 +58,7 @@
|
||||
//| :rtype: bytes or None"""
|
||||
//| ...
|
||||
//|
|
||||
//| def readinto(self, buf: Any, nbytes: Any = None) -> Any:
|
||||
//| def readinto(self, buf: WriteableBuffer, nbytes: int = None) -> Optional[bytes]:
|
||||
//| """Read bytes into the ``buf``. If ``nbytes`` is specified then read at most
|
||||
//| that many bytes. Otherwise, read at most ``len(buf)`` bytes.
|
||||
//|
|
||||
|
@ -47,7 +47,7 @@
|
||||
|
||||
// These are standard stream methods. Code is in py/stream.c.
|
||||
//
|
||||
//| def write(self, buf: Any) -> Any:
|
||||
//| def write(self, buf: ReadableBuffer) -> Optional[int]:
|
||||
//| """Write the buffer of bytes to the bus.
|
||||
//|
|
||||
//| :return: the number of bytes written
|
||||
|
Loading…
Reference in New Issue
Block a user