The pyserial documentation says that read returns bytes. The comment in serialutil.pyi discusses this and has read and read_until returning bytes, not bytes | None.
For some reason read_all is typed as returning bytes | None? The implementation simply calls read, so I don't see why it's different from read.
Have I missed something?
Thanks for maintaining typeshed!
The pyserial documentation says that
readreturnsbytes. The comment inserialutil.pyidiscusses this and hasreadandread_untilreturningbytes, notbytes | None.For some reason
read_allis typed as returningbytes | None? The implementation simply callsread, so I don't see why it's different fromread.Have I missed something?
Thanks for maintaining typeshed!