mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-26 03:27:14 +08:00
Fix third_party errors with --disallow-any-generics (#3278)
Part of #3267. Together with #3276 this should fix all such problems.
This commit is contained in:
committed by
Jelle Zijlstra
parent
412b9e74d5
commit
ed4b1de0ad
4
third_party/2/gflags.pyi
vendored
4
third_party/2/gflags.pyi
vendored
@@ -35,7 +35,7 @@ class FlagValues:
|
||||
def is_gnu_getopt(self) -> bool: ...
|
||||
IsGnuGetOpt = is_gnu_getopt
|
||||
# TODO dict type
|
||||
def FlagDict(self) -> dict: ...
|
||||
def FlagDict(self) -> Dict[Any, Any]: ...
|
||||
def flags_by_module_dict(self) -> Dict[str, List[Flag]]: ...
|
||||
FlagsByModuleDict = flags_by_module_dict
|
||||
def flags_by_module_id_dict(self) -> Dict[int, List[Flag]]: ...
|
||||
@@ -206,7 +206,7 @@ def DEFINE_enum(name: str, default: Optional[str], enum_values: List[str], help:
|
||||
|
||||
class BaseListParser(ArgumentParser):
|
||||
def __init__(self, token: str = ..., name: str = ...) -> None: ...
|
||||
def Parse(self, argument: Any) -> list: ...
|
||||
def Parse(self, argument: Any) -> List[Any]: ...
|
||||
|
||||
class ListParser(BaseListParser):
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
6
third_party/2/tornado/httputil.pyi
vendored
6
third_party/2/tornado/httputil.pyi
vendored
@@ -1,16 +1,16 @@
|
||||
from typing import Any
|
||||
from typing import Any, Dict
|
||||
from tornado.util import ObjectDict
|
||||
from collections import namedtuple
|
||||
|
||||
class SSLError(Exception): ...
|
||||
|
||||
class _NormalizedHeaderCache(dict):
|
||||
class _NormalizedHeaderCache(Dict[Any, Any]):
|
||||
size: Any
|
||||
queue: Any
|
||||
def __init__(self, size) -> None: ...
|
||||
def __missing__(self, key): ...
|
||||
|
||||
class HTTPHeaders(dict):
|
||||
class HTTPHeaders(Dict[Any, Any]):
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
def add(self, name, value): ...
|
||||
def get_list(self, name): ...
|
||||
|
||||
7
third_party/2/tornado/testing.pyi
vendored
7
third_party/2/tornado/testing.pyi
vendored
@@ -43,12 +43,9 @@ class AsyncHTTPSTestCase(AsyncHTTPTestCase):
|
||||
def get_protocol(self): ...
|
||||
|
||||
@overload
|
||||
def gen_test(*, timeout: Optional[float] = ...) -> Callable[[Callable[..., Generator]], Callable[..., None]]:
|
||||
...
|
||||
|
||||
def gen_test(*, timeout: Optional[float] = ...) -> Callable[[Callable[..., Generator[Any, Any, Any]]], Callable[..., None]]: ...
|
||||
@overload
|
||||
def gen_test(func: Callable[..., Generator]) -> Callable[..., None]:
|
||||
...
|
||||
def gen_test(func: Callable[..., Generator[Any, Any, Any]]) -> Callable[..., None]: ...
|
||||
|
||||
class LogTrapTestCase(unittest.TestCase):
|
||||
def run(self, result: Optional[Any] = ...): ...
|
||||
|
||||
4
third_party/2/tornado/util.pyi
vendored
4
third_party/2/tornado/util.pyi
vendored
@@ -1,8 +1,8 @@
|
||||
from typing import Any
|
||||
from typing import Any, Dict
|
||||
|
||||
xrange: Any
|
||||
|
||||
class ObjectDict(dict):
|
||||
class ObjectDict(Dict[Any, Any]):
|
||||
def __getattr__(self, name): ...
|
||||
def __setattr__(self, name, value): ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user