mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-10 13:32:26 +08:00
Added some missing parameter annotations and type arguments detected by pyright. (#5061)
Co-authored-by: Eric Traut <erictr@microsoft.com>
This commit is contained in:
@@ -21,10 +21,10 @@ _T = TypeVar("_T")
|
||||
_T1 = TypeVar("_T1")
|
||||
_T2 = TypeVar("_T2")
|
||||
_T3 = TypeVar("_T3")
|
||||
_I = TypeVar("_I", bound=Iterable)
|
||||
_I = TypeVar("_I", bound=Iterable[Any])
|
||||
_K = TypeVar("_K")
|
||||
_V = TypeVar("_V")
|
||||
_M = TypeVar("_M", bound=Mapping)
|
||||
_M = TypeVar("_M", bound=Mapping[Any, Any])
|
||||
|
||||
# To be more precise on instance_of use some overloads.
|
||||
# If there are more than 3 items in the tuple then we fall back to Any
|
||||
|
||||
@@ -390,7 +390,7 @@ if sys.version_info >= (3, 8):
|
||||
def assert_any_await(self, *args: Any, **kwargs: Any) -> None: ...
|
||||
def assert_has_awaits(self, calls: _CallList, any_order: bool = ...) -> None: ...
|
||||
def assert_not_awaited(self) -> None: ...
|
||||
def reset_mock(self, *args, **kwargs) -> None: ...
|
||||
def reset_mock(self, *args: Any, **kwargs: Any) -> None: ...
|
||||
await_count: int
|
||||
await_args: Optional[_Call]
|
||||
await_args_list: _CallList
|
||||
|
||||
@@ -5,7 +5,7 @@ _T = TypeVar("_T")
|
||||
class weekday(object):
|
||||
def __init__(self, weekday: int, n: Optional[int] = ...) -> None: ...
|
||||
def __call__(self: _T, n: int) -> _T: ...
|
||||
def __eq__(self, other) -> bool: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __repr__(self) -> str: ...
|
||||
def __hash__(self) -> int: ...
|
||||
weekday: int
|
||||
|
||||
@@ -88,7 +88,7 @@ class relativedelta(object):
|
||||
def __nonzero__(self) -> bool: ...
|
||||
def __mul__(self: _SelfT, other: SupportsFloat) -> _SelfT: ...
|
||||
def __rmul__(self: _SelfT, other: SupportsFloat) -> _SelfT: ...
|
||||
def __eq__(self, other) -> bool: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __ne__(self, other: object) -> bool: ...
|
||||
def __div__(self: _SelfT, other: SupportsFloat) -> _SelfT: ...
|
||||
def __truediv__(self: _SelfT, other: SupportsFloat) -> _SelfT: ...
|
||||
|
||||
@@ -25,4 +25,4 @@ def retry(
|
||||
backoff: float = ...,
|
||||
jitter: Union[Tuple[float, float], float] = ...,
|
||||
logger: Optional[Logger] = ...,
|
||||
) -> _Decorator: ...
|
||||
) -> _Decorator[_T]: ...
|
||||
|
||||
@@ -4,8 +4,8 @@ from typing import Any, Dict, FrozenSet, Iterable, List, Optional, Sequence, Set
|
||||
from .compat import HAS_IPV6 as HAS_IPV6, PY2 as PY2, WIN as WIN, string_types as string_types
|
||||
from .proxy_headers import PROXY_HEADERS as PROXY_HEADERS
|
||||
|
||||
truthy: FrozenSet
|
||||
KNOWN_PROXY_HEADERS: FrozenSet
|
||||
truthy: FrozenSet[Any]
|
||||
KNOWN_PROXY_HEADERS: FrozenSet[Any]
|
||||
|
||||
def asbool(s: Optional[Union[bool, str, int]]) -> bool: ...
|
||||
def asoctal(s: str) -> int: ...
|
||||
|
||||
@@ -10,7 +10,7 @@ VERSION: str
|
||||
XXHASH_VERSION: str
|
||||
|
||||
class _IntDigestHash(_Hash):
|
||||
def __init__(self, __string: ReadableBuffer = ...): ...
|
||||
def __init__(self, __string: ReadableBuffer = ...) -> None: ...
|
||||
def intdigest(self) -> int: ...
|
||||
|
||||
# python-xxhash v2.0.0 does not support the string or usedforsecurity kwargs
|
||||
|
||||
Reference in New Issue
Block a user