mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-17 23:34:13 +08:00
Enable --disallow-any-generics for stubs (#3288)
This commit is contained in:
committed by
Jelle Zijlstra
parent
23b353303b
commit
c32e1e2280
30
third_party/2/concurrent/futures/_base.pyi
vendored
30
third_party/2/concurrent/futures/_base.pyi
vendored
@@ -62,25 +62,25 @@ def wait(fs: Iterable[Future[_T]], timeout: Optional[float] = ..., return_when:
|
||||
|
||||
class _Waiter:
|
||||
event: threading.Event
|
||||
finished_futures: List[Future]
|
||||
finished_futures: List[Future[Any]]
|
||||
def __init__(self) -> None: ...
|
||||
def add_result(self, future: Future) -> None: ...
|
||||
def add_exception(self, future: Future) -> None: ...
|
||||
def add_cancelled(self, future: Future) -> None: ...
|
||||
def add_result(self, future: Future[Any]) -> None: ...
|
||||
def add_exception(self, future: Future[Any]) -> None: ...
|
||||
def add_cancelled(self, future: Future[Any]) -> None: ...
|
||||
|
||||
|
||||
class _AsCompletedWaiter(_Waiter):
|
||||
lock: threading.Lock
|
||||
def __init__(self) -> None: ...
|
||||
def add_result(self, future: Future) -> None: ...
|
||||
def add_exception(self, future: Future) -> None: ...
|
||||
def add_cancelled(self, future: Future) -> None: ...
|
||||
def add_result(self, future: Future[Any]) -> None: ...
|
||||
def add_exception(self, future: Future[Any]) -> None: ...
|
||||
def add_cancelled(self, future: Future[Any]) -> None: ...
|
||||
|
||||
|
||||
class _FirstCompletedWaiter(_Waiter):
|
||||
def add_result(self, future: Future) -> None: ...
|
||||
def add_exception(self, future: Future) -> None: ...
|
||||
def add_cancelled(self, future: Future) -> None: ...
|
||||
def add_result(self, future: Future[Any]) -> None: ...
|
||||
def add_exception(self, future: Future[Any]) -> None: ...
|
||||
def add_cancelled(self, future: Future[Any]) -> None: ...
|
||||
|
||||
|
||||
class _AllCompletedWaiter(_Waiter):
|
||||
@@ -88,13 +88,13 @@ class _AllCompletedWaiter(_Waiter):
|
||||
stop_on_exception: bool
|
||||
lock: threading.Lock
|
||||
def __init__(self, num_pending_calls: int, stop_on_exception: bool) -> None: ...
|
||||
def add_result(self, future: Future) -> None: ...
|
||||
def add_exception(self, future: Future) -> None: ...
|
||||
def add_cancelled(self, future: Future) -> None: ...
|
||||
def add_result(self, future: Future[Any]) -> None: ...
|
||||
def add_exception(self, future: Future[Any]) -> None: ...
|
||||
def add_cancelled(self, future: Future[Any]) -> None: ...
|
||||
|
||||
|
||||
class _AcquireFutures:
|
||||
futures: Iterable[Future]
|
||||
def __init__(self, futures: Iterable[Future]) -> None: ...
|
||||
futures: Iterable[Future[Any]]
|
||||
def __init__(self, futures: Iterable[Future[Any]]) -> None: ...
|
||||
def __enter__(self) -> None: ...
|
||||
def __exit__(self, *args: Any) -> None: ...
|
||||
|
||||
13
third_party/2/concurrent/futures/thread.pyi
vendored
13
third_party/2/concurrent/futures/thread.pyi
vendored
@@ -1,4 +1,4 @@
|
||||
from typing import Any, Callable, Optional, Tuple, TypeVar, Generic
|
||||
from typing import Any, Callable, Iterable, Mapping, Optional, Tuple, TypeVar, Generic
|
||||
from ._base import Executor, Future
|
||||
import sys
|
||||
|
||||
@@ -22,10 +22,9 @@ class ThreadPoolExecutor(Executor):
|
||||
|
||||
|
||||
class _WorkItem(Generic[_S]):
|
||||
future: Future
|
||||
fn: Callable[[Future[_S]], Any]
|
||||
args: Any
|
||||
kwargs: Any
|
||||
def __init__(self, future: Future, fn: Callable[[Future[_S]], Any], args: Any,
|
||||
kwargs: Any) -> None: ...
|
||||
future: Future[_S]
|
||||
fn: Callable[..., _S]
|
||||
args: Iterable[Any]
|
||||
kwargs: Mapping[str, Any]
|
||||
def __init__(self, future: Future[_S], fn: Callable[..., _S], args: Iterable[Any], kwargs: Mapping[str, Any]) -> None: ...
|
||||
def run(self) -> None: ...
|
||||
|
||||
2
third_party/2and3/boto/utils.pyi
vendored
2
third_party/2and3/boto/utils.pyi
vendored
@@ -37,7 +37,7 @@ if sys.version_info >= (3,):
|
||||
else:
|
||||
# TODO move _StringIO definition into boto.compat once stubs exist and rename to StringIO
|
||||
import StringIO
|
||||
_StringIO = StringIO.StringIO
|
||||
_StringIO = StringIO.StringIO[Any]
|
||||
|
||||
from hashlib import _hash
|
||||
_HashType = _hash
|
||||
|
||||
8
third_party/2and3/mock.pyi
vendored
8
third_party/2and3/mock.pyi
vendored
@@ -1,7 +1,9 @@
|
||||
# Stubs for mock
|
||||
|
||||
import sys
|
||||
from typing import Any, Optional, Text, Type
|
||||
from typing import Any, List, Optional, Text, Tuple, Type, TypeVar
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
FILTER_DIR: Any
|
||||
|
||||
@@ -18,7 +20,7 @@ class _Sentinel:
|
||||
sentinel: Any
|
||||
DEFAULT: Any
|
||||
|
||||
class _CallList(list):
|
||||
class _CallList(List[_T]):
|
||||
def __contains__(self, value: Any) -> bool: ...
|
||||
|
||||
class _MockIter:
|
||||
@@ -111,7 +113,7 @@ class _ANY:
|
||||
|
||||
ANY: Any
|
||||
|
||||
class _Call(tuple):
|
||||
class _Call(Tuple[Any, ...]):
|
||||
def __new__(cls, value: Any = ..., name: Optional[Any] = ..., parent: Optional[Any] = ..., two: bool = ..., from_kall: bool = ...) -> Any: ...
|
||||
name: Any
|
||||
parent: Any
|
||||
|
||||
Reference in New Issue
Block a user