summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shared-bindings/usb_midi/PortIn.c4
-rw-r--r--shared-bindings/usb_midi/PortOut.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/shared-bindings/usb_midi/PortIn.c b/shared-bindings/usb_midi/PortIn.c
index 9d9310b47..176283cd5 100644
--- a/shared-bindings/usb_midi/PortIn.c
+++ b/shared-bindings/usb_midi/PortIn.c
@@ -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.
//|
diff --git a/shared-bindings/usb_midi/PortOut.c b/shared-bindings/usb_midi/PortOut.c
index b4afbc036..92ed451e9 100644
--- a/shared-bindings/usb_midi/PortOut.c
+++ b/shared-bindings/usb_midi/PortOut.c
@@ -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