From 8cbf009bb75bd4f22e749507af40ccb35f4344ae Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Thu, 20 Aug 2020 15:51:15 -0700 Subject: [PATCH] Added some missing type annotations within third-party stub files (#4467) Co-authored-by: Eric Traut --- third_party/3/docutils/__init__.pyi | 2 +- third_party/3/docutils/examples.pyi | 2 +- third_party/3/docutils/nodes.pyi | 4 ++-- third_party/3/docutils/parsers/__init__.pyi | 2 +- third_party/3/docutils/parsers/rst/__init__.pyi | 2 +- third_party/3/docutils/parsers/rst/nodes.pyi | 2 +- third_party/3/docutils/parsers/rst/states.pyi | 2 +- third_party/3/typed_ast/ast27.pyi | 2 +- third_party/3/typed_ast/ast3.pyi | 2 +- third_party/3/waitress/runner.pyi | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/third_party/3/docutils/__init__.pyi b/third_party/3/docutils/__init__.pyi index 024e962b1..e27843e53 100644 --- a/third_party/3/docutils/__init__.pyi +++ b/third_party/3/docutils/__init__.pyi @@ -1,3 +1,3 @@ from typing import Any -def __getattr__(name) -> Any: ... +def __getattr__(name: str) -> Any: ... diff --git a/third_party/3/docutils/examples.pyi b/third_party/3/docutils/examples.pyi index ec73a299d..581ebba7e 100644 --- a/third_party/3/docutils/examples.pyi +++ b/third_party/3/docutils/examples.pyi @@ -2,4 +2,4 @@ from typing import Any html_parts: Any -def __getattr__(name) -> Any: ... +def __getattr__(name: str) -> Any: ... diff --git a/third_party/3/docutils/nodes.pyi b/third_party/3/docutils/nodes.pyi index 0c3588c2b..11773347f 100644 --- a/third_party/3/docutils/nodes.pyi +++ b/third_party/3/docutils/nodes.pyi @@ -1,6 +1,6 @@ from typing import Any, List class reference: - def __init__(self, rawsource: str = ..., text: str = ..., *children: List[Any], **attributes) -> None: ... + def __init__(self, rawsource: str = ..., text: str = ..., *children: List[Any], **attributes: Any) -> None: ... -def __getattr__(name) -> Any: ... +def __getattr__(name: str) -> Any: ... diff --git a/third_party/3/docutils/parsers/__init__.pyi b/third_party/3/docutils/parsers/__init__.pyi index 024e962b1..e27843e53 100644 --- a/third_party/3/docutils/parsers/__init__.pyi +++ b/third_party/3/docutils/parsers/__init__.pyi @@ -1,3 +1,3 @@ from typing import Any -def __getattr__(name) -> Any: ... +def __getattr__(name: str) -> Any: ... diff --git a/third_party/3/docutils/parsers/rst/__init__.pyi b/third_party/3/docutils/parsers/rst/__init__.pyi index 024e962b1..e27843e53 100644 --- a/third_party/3/docutils/parsers/rst/__init__.pyi +++ b/third_party/3/docutils/parsers/rst/__init__.pyi @@ -1,3 +1,3 @@ from typing import Any -def __getattr__(name) -> Any: ... +def __getattr__(name: str) -> Any: ... diff --git a/third_party/3/docutils/parsers/rst/nodes.pyi b/third_party/3/docutils/parsers/rst/nodes.pyi index 024e962b1..e27843e53 100644 --- a/third_party/3/docutils/parsers/rst/nodes.pyi +++ b/third_party/3/docutils/parsers/rst/nodes.pyi @@ -1,3 +1,3 @@ from typing import Any -def __getattr__(name) -> Any: ... +def __getattr__(name: str) -> Any: ... diff --git a/third_party/3/docutils/parsers/rst/states.pyi b/third_party/3/docutils/parsers/rst/states.pyi index fef856665..ac0872693 100644 --- a/third_party/3/docutils/parsers/rst/states.pyi +++ b/third_party/3/docutils/parsers/rst/states.pyi @@ -3,4 +3,4 @@ from typing import Any class Inliner: def __init__(self) -> None: ... -def __getattr__(name) -> Any: ... +def __getattr__(name: str) -> Any: ... diff --git a/third_party/3/typed_ast/ast27.pyi b/third_party/3/typed_ast/ast27.pyi index 787f63dfe..760efdbc8 100644 --- a/third_party/3/typed_ast/ast27.pyi +++ b/third_party/3/typed_ast/ast27.pyi @@ -28,7 +28,7 @@ identifier = str class AST: _attributes: typing.Tuple[str, ...] _fields: typing.Tuple[str, ...] - def __init__(self, *args, **kwargs) -> None: ... + def __init__(self, *args: Any, **kwargs: Any) -> None: ... class mod(AST): ... diff --git a/third_party/3/typed_ast/ast3.pyi b/third_party/3/typed_ast/ast3.pyi index 802f6707c..631924cfb 100644 --- a/third_party/3/typed_ast/ast3.pyi +++ b/third_party/3/typed_ast/ast3.pyi @@ -28,7 +28,7 @@ identifier = str class AST: _attributes: typing.Tuple[str, ...] _fields: typing.Tuple[str, ...] - def __init__(self, *args, **kwargs) -> None: ... + def __init__(self, *args: Any, **kwargs: Any) -> None: ... class mod(AST): ... diff --git a/third_party/3/waitress/runner.pyi b/third_party/3/waitress/runner.pyi index f9493e21e..a817771a2 100644 --- a/third_party/3/waitress/runner.pyi +++ b/third_party/3/waitress/runner.pyi @@ -8,4 +8,4 @@ def match(obj_name: str) -> Tuple[str, str]: ... def resolve(module_name: str, object_name: str) -> Any: ... def show_help(stream: TextIOWrapper, name: str, error: Optional[str] = ...) -> None: ... def show_exception(stream: TextIOWrapper) -> None: ... -def run(argv: Sequence[str] = ..., _serve: Callable[..., Any] = ...): ... +def run(argv: Sequence[str] = ..., _serve: Callable[..., Any] = ...) -> None: ...