Add ctypes base type to WriteableBuffer.
Add a ReadOnlyBuffer type from fcntl.
Base ReadableBuffer on WriteableBuffer and ReadOnlyBuffer.
Use these types in fcntl and ctypes stubs.
I just found and fixed a bug in pyright's "missing type arguments" check. When type arguments were omitted for a generic type within a subscript expression, the error was being suppressed. With this bug fixed, I found several new cases where type arguments were missing in stdlib stubs. (#5130)
Co-authored-by: Eric Traut <erictr@microsoft.com>