micropython-stubs
micropython-stubs copied to clipboard
create mpy_shed/reference stubs for MicroPython Buffer protocol
This is likely a good addition to reference_mpy_shed\buffer_mp.pyi but care must be taken to verify correct operation and conflicts.
Also need to determine how to work with , or replace AnyReadableBuf and AnyWritableBuf
The signature is:
stream.write(buf)
stream.write(buf, max_len)
stream.write(buf, off, max_len)
I don't think this is actually documented anywhere, but it may be relied upon in some code.
Originally posted by @dpgeorge in https://github.com/micropython/micropython/pull/17938#discussion_r2329804709