mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-27 22:31:12 +08:00
Added a few missing type arguments for generic types used in stdlib 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>
This commit is contained in:
@@ -72,7 +72,7 @@ pythonapi: PyDLL = ...
|
||||
# Anything that implements the read-write buffer interface.
|
||||
# The buffer interface is defined purely on the C level, so we cannot define a normal Protocol
|
||||
# for it. Instead we have to list the most common stdlib buffer classes in a Union.
|
||||
_WritableBuffer = _UnionT[bytearray, memoryview, array, _CData]
|
||||
_WritableBuffer = _UnionT[bytearray, memoryview, array[Any], _CData]
|
||||
# Same as _WritableBuffer, but also includes read-only buffer types (like bytes).
|
||||
_ReadOnlyBuffer = _UnionT[_WritableBuffer, bytes]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user