Closed tekktrik closed 2 years ago
Change # 1 - Changed to Union[bytes, bytearray]
and also added the missing type hint for buf
, but if there's a way to do _typing.ReadableBuffer
that might be better. Don't know a lot about the other buffer types either so not sure whether this function should be accepting them either, but let me know if that makes more sense.
Change # 2 - Added
Change # 3 - Added
Change # 4 - Left as bytearray
for now but I'll change it if I misunderstood and that parameter can be of type bytes
Probably the most complex typing PR I've done, so definitely would appreciate a thorough look from someone else @___@ I had to learn a few things for this one, so hopefully I implemented it all correctly!