mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-28 13:52: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:
@@ -174,11 +174,11 @@ class SupportsWrite(Protocol[_T_contra]):
|
||||
def write(self, __s: _T_contra) -> Any: ...
|
||||
|
||||
if sys.version_info >= (3,):
|
||||
ReadableBuffer = Union[bytes, bytearray, memoryview, array.array, mmap.mmap]
|
||||
WriteableBuffer = Union[bytearray, memoryview, array.array, mmap.mmap]
|
||||
ReadableBuffer = Union[bytes, bytearray, memoryview, array.array[Any], mmap.mmap]
|
||||
WriteableBuffer = Union[bytearray, memoryview, array.array[Any], mmap.mmap]
|
||||
else:
|
||||
ReadableBuffer = Union[bytes, bytearray, memoryview, array.array, mmap.mmap, buffer]
|
||||
WriteableBuffer = Union[bytearray, memoryview, array.array, mmap.mmap, buffer]
|
||||
ReadableBuffer = Union[bytes, bytearray, memoryview, array.array[Any], mmap.mmap, buffer]
|
||||
WriteableBuffer = Union[bytearray, memoryview, array.array[Any], mmap.mmap, buffer]
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
from types import NoneType as NoneType
|
||||
|
||||
Reference in New Issue
Block a user