mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +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:
@@ -7,7 +7,7 @@ from typing import Any, Dict, Iterable, Optional, Tuple, Union, overload
|
||||
class _HasWrapper:
|
||||
__wrapper__: Union[_HasWrapper, FunctionType]
|
||||
|
||||
_FuncType = Union[FunctionType, _HasWrapper, functools.partial, functools.partialmethod]
|
||||
_FuncType = Union[FunctionType, _HasWrapper, functools.partial[Any], functools.partialmethod[Any]]
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
@overload
|
||||
|
||||
@@ -5,7 +5,7 @@ from typing import Any, BinaryIO, Iterable, List, NoReturn, Optional, Tuple, Typ
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
# These are based in socket, maybe move them out into _typeshed.pyi or such
|
||||
_Address = Union[tuple, str]
|
||||
_Address = Union[Tuple[Any, ...], str]
|
||||
_RetAddress = Any
|
||||
_WriteBuffer = Union[bytearray, memoryview]
|
||||
_CMSG = Tuple[int, int, bytes]
|
||||
|
||||
Reference in New Issue
Block a user