upgrade black version (#4486)

Manually removed a number of trailing commas to prevent black from unnecessarily
exploding some collections.
This commit is contained in:
Jelle Zijlstra
2020-08-26 09:36:01 -07:00
committed by GitHub
parent e3e395b28c
commit 5f9fd3d127
61 changed files with 165 additions and 181 deletions

View File

@@ -52,7 +52,7 @@ class Executor:
self, func: Callable[..., _T], *iterables: Iterable[Any], timeout: Optional[float] = ..., chunksize: int = ...
) -> Iterator[_T]: ...
else:
def map(self, func: Callable[..., _T], *iterables: Iterable[Any], timeout: Optional[float] = ...,) -> Iterator[_T]: ...
def map(self, func: Callable[..., _T], *iterables: Iterable[Any], timeout: Optional[float] = ...) -> Iterator[_T]: ...
def shutdown(self, wait: bool = ...) -> None: ...
def __enter__(self: _T) -> _T: ...
def __exit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> Optional[bool]: ...

View File

@@ -100,7 +100,7 @@ class Path(PurePath):
# Unbuffered binary mode: returns a FileIO
@overload
def open(
self, mode: OpenBinaryMode, buffering: Literal[0], encoding: None = ..., errors: None = ..., newline: None = ...,
self, mode: OpenBinaryMode, buffering: Literal[0], encoding: None = ..., errors: None = ..., newline: None = ...
) -> FileIO: ...
# Buffering is on: return BufferedRandom, BufferedReader, or BufferedWriter
@overload
@@ -133,7 +133,7 @@ class Path(PurePath):
# Buffering cannot be determined: fall back to BinaryIO
@overload
def open(
self, mode: OpenBinaryMode, buffering: int, encoding: None = ..., errors: None = ..., newline: None = ...,
self, mode: OpenBinaryMode, buffering: int, encoding: None = ..., errors: None = ..., newline: None = ...
) -> BinaryIO: ...
# Fallback if mode is not specified
@overload

View File

@@ -13,4 +13,4 @@ class AtomicWriter(object):
def commit(self, f: IO[Any]) -> None: ...
def rollback(self, f: IO[Any]) -> None: ...
def atomic_write(path: AnyPath, writer_cls: Type[AtomicWriter] = ..., **cls_kwargs: object,) -> ContextManager[IO[Any]]: ...
def atomic_write(path: AnyPath, writer_cls: Type[AtomicWriter] = ..., **cls_kwargs: object) -> ContextManager[IO[Any]]: ...

View File

@@ -37,7 +37,7 @@ NOTHING: object
@overload
def Factory(factory: Callable[[], _T]) -> _T: ...
@overload
def Factory(factory: Union[Callable[[Any], _T], Callable[[], _T]], takes_self: bool = ...,) -> _T: ...
def Factory(factory: Union[Callable[[Any], _T], Callable[[], _T]], takes_self: bool = ...) -> _T: ...
class Attribute(Generic[_T]):
name: str

View File

@@ -43,12 +43,12 @@ def optional(validator: Union[_ValidatorType[_T], List[_ValidatorType[_T]]]) ->
def in_(options: Container[_T]) -> _ValidatorType[_T]: ...
def and_(*validators: _ValidatorType[_T]) -> _ValidatorType[_T]: ...
def matches_re(
regex: AnyStr, flags: int = ..., func: Optional[Callable[[AnyStr, AnyStr, int], Optional[Match[AnyStr]]]] = ...,
regex: AnyStr, flags: int = ..., func: Optional[Callable[[AnyStr, AnyStr, int], Optional[Match[AnyStr]]]] = ...
) -> _ValidatorType[AnyStr]: ...
def deep_iterable(
member_validator: _ValidatorType[_T], iterable_validator: Optional[_ValidatorType[_I]] = ...,
member_validator: _ValidatorType[_T], iterable_validator: Optional[_ValidatorType[_I]] = ...
) -> _ValidatorType[_I]: ...
def deep_mapping(
key_validator: _ValidatorType[_K], value_validator: _ValidatorType[_V], mapping_validator: Optional[_ValidatorType[_M]] = ...,
key_validator: _ValidatorType[_K], value_validator: _ValidatorType[_V], mapping_validator: Optional[_ValidatorType[_M]] = ...
) -> _ValidatorType[_M]: ...
def is_callable() -> _ValidatorType[_T]: ...

View File

@@ -23,5 +23,5 @@ def clean(
strip_comments: bool = ...,
) -> Text: ...
def linkify(
text: Text, callbacks: Iterable[_Callback] = ..., skip_tags: Optional[Container[Text]] = ..., parse_email: bool = ...,
text: Text, callbacks: Iterable[_Callback] = ..., skip_tags: Optional[Container[Text]] = ..., parse_email: bool = ...
) -> Text: ...

View File

@@ -64,22 +64,22 @@ def canonical_string(
provider: Optional[_Provider] = ...,
) -> str: ...
def merge_meta(
headers: Mapping[str, str], metadata: Mapping[str, str], provider: Optional[_Provider] = ...,
headers: Mapping[str, str], metadata: Mapping[str, str], provider: Optional[_Provider] = ...
) -> Mapping[str, str]: ...
def get_aws_metadata(headers: Mapping[str, str], provider: Optional[_Provider] = ...,) -> Mapping[str, str]: ...
def retry_url(url: str, retry_on_404: bool = ..., num_retries: int = ..., timeout: Optional[int] = ...,) -> str: ...
def get_aws_metadata(headers: Mapping[str, str], provider: Optional[_Provider] = ...) -> Mapping[str, str]: ...
def retry_url(url: str, retry_on_404: bool = ..., num_retries: int = ..., timeout: Optional[int] = ...) -> str: ...
class LazyLoadMetadata(Dict[_KT, _VT]):
def __init__(self, url: str, num_retries: int, timeout: Optional[int] = ...,) -> None: ...
def __init__(self, url: str, num_retries: int, timeout: Optional[int] = ...) -> None: ...
def get_instance_metadata(
version: str = ..., url: str = ..., data: str = ..., timeout: Optional[int] = ..., num_retries: int = ...,
version: str = ..., url: str = ..., data: str = ..., timeout: Optional[int] = ..., num_retries: int = ...
) -> Optional[LazyLoadMetadata[Any, Any]]: ...
def get_instance_identity(
version: str = ..., url: str = ..., timeout: Optional[int] = ..., num_retries: int = ...,
version: str = ..., url: str = ..., timeout: Optional[int] = ..., num_retries: int = ...
) -> Optional[Mapping[str, Any]]: ...
def get_instance_userdata(
version: str = ..., sep: Optional[str] = ..., url: str = ..., timeout: Optional[int] = ..., num_retries: int = ...,
version: str = ..., sep: Optional[str] = ..., url: str = ..., timeout: Optional[int] = ..., num_retries: int = ...
) -> Mapping[str, str]: ...
ISO8601: str
@@ -93,7 +93,7 @@ def parse_ts(ts: str) -> datetime.datetime: ...
def find_class(module_name: str, class_name: Optional[str] = ...) -> Optional[Type[Any]]: ...
def update_dme(username: str, password: str, dme_id: str, ip_address: str) -> str: ...
def fetch_file(
uri: str, file: Optional[IO[str]] = ..., username: Optional[str] = ..., password: Optional[str] = ...,
uri: str, file: Optional[IO[str]] = ..., username: Optional[str] = ..., password: Optional[str] = ...
) -> Optional[IO[str]]: ...
class ShellCommand:
@@ -103,7 +103,7 @@ class ShellCommand:
wait: bool
fail_fast: bool
def __init__(
self, command: subprocess._CMD, wait: bool = ..., fail_fast: bool = ..., cwd: Optional[subprocess._TXT] = ...,
self, command: subprocess._CMD, wait: bool = ..., fail_fast: bool = ..., cwd: Optional[subprocess._TXT] = ...
) -> None: ...
process: subprocess.Popen[Any]
def run(self, cwd: Optional[subprocess._CMD] = ...) -> Optional[int]: ...
@@ -117,7 +117,7 @@ class AuthSMTPHandler(logging.handlers.SMTPHandler):
username: str
password: str
def __init__(
self, mailhost: str, username: str, password: str, fromaddr: str, toaddrs: Sequence[str], subject: str,
self, mailhost: str, username: str, password: str, fromaddr: str, toaddrs: Sequence[str], subject: str
) -> None: ...
class LRUCache(Dict[_KT, _VT]):
@@ -139,7 +139,7 @@ _str = str
class Password:
hashfunc: Callable[[bytes], _HashType]
str: Optional[_str]
def __init__(self, str: Optional[_str] = ..., hashfunc: Optional[Callable[[bytes], _HashType]] = ...,) -> None: ...
def __init__(self, str: Optional[_str] = ..., hashfunc: Optional[Callable[[bytes], _HashType]] = ...) -> None: ...
def set(self, value: Union[bytes, _str]) -> None: ...
def __eq__(self, other: Any) -> bool: ...
def __len__(self) -> int: ...
@@ -156,19 +156,19 @@ def get_utf8_value(value: str) -> bytes: ...
def mklist(value: Any) -> List[Any]: ...
def pythonize_name(name: str) -> str: ...
def write_mime_multipart(
content: List[Tuple[str, str]], compress: bool = ..., deftype: str = ..., delimiter: str = ...,
content: List[Tuple[str, str]], compress: bool = ..., deftype: str = ..., delimiter: str = ...
) -> str: ...
def guess_mime_type(content: str, deftype: str) -> str: ...
def compute_md5(fp: IO[Any], buf_size: int = ..., size: Optional[int] = ...,) -> Tuple[str, str, int]: ...
def compute_md5(fp: IO[Any], buf_size: int = ..., size: Optional[int] = ...) -> Tuple[str, str, int]: ...
def compute_hash(
fp: IO[Any], buf_size: int = ..., size: Optional[int] = ..., hash_algorithm: Any = ...,
fp: IO[Any], buf_size: int = ..., size: Optional[int] = ..., hash_algorithm: Any = ...
) -> Tuple[str, str, int]: ...
def find_matching_headers(name: str, headers: Mapping[str, Optional[str]]) -> List[str]: ...
def merge_headers_by_name(name: str, headers: Mapping[str, Optional[str]]) -> str: ...
class RequestHook:
def handle_request_data(
self, request: boto.connection.HTTPRequest, response: boto.connection.HTTPResponse, error: bool = ...,
self, request: boto.connection.HTTPRequest, response: boto.connection.HTTPResponse, error: bool = ...
) -> Any: ...
def host_is_ipv6(hostname: str) -> bool: ...

View File

@@ -25,7 +25,7 @@ def invoke_param_callback(
) -> Any: ...
def augment_usage_errors(ctx: Context, param: Optional[Parameter] = ...) -> ContextManager[None]: ...
def iter_params_for_processing(
invocation_order: Sequence[Parameter], declaration_order: Iterable[Parameter],
invocation_order: Sequence[Parameter], declaration_order: Iterable[Parameter]
) -> Iterable[Parameter]: ...
class Context:
@@ -188,10 +188,10 @@ class _ParamType:
name: str
is_composite: bool
envvar_list_splitter: Optional[str]
def __call__(self, value: Optional[str], param: Optional[Parameter] = ..., ctx: Optional[Context] = ...,) -> Any: ...
def __call__(self, value: Optional[str], param: Optional[Parameter] = ..., ctx: Optional[Context] = ...) -> Any: ...
def get_metavar(self, param: Parameter) -> str: ...
def get_missing_message(self, param: Parameter) -> str: ...
def convert(self, value: str, param: Optional[Parameter], ctx: Optional[Context],) -> Any: ...
def convert(self, value: str, param: Optional[Parameter], ctx: Optional[Context]) -> Any: ...
def split_envvar_value(self, rv: str) -> List[str]: ...
def fail(self, message: str, param: Optional[Parameter] = ..., ctx: Optional[Context] = ...) -> NoReturn: ...

View File

@@ -13,15 +13,20 @@ class HelpFormatter:
width: Optional[int]
current_indent: int
buffer: List[str]
def __init__(self, indent_increment: int = ..., width: Optional[int] = ..., max_width: Optional[int] = ...,) -> None: ...
def __init__(self, indent_increment: int = ..., width: Optional[int] = ..., max_width: Optional[int] = ...) -> None: ...
def write(self, string: str) -> None: ...
def indent(self) -> None: ...
def dedent(self) -> None: ...
def write_usage(self, prog: str, args: str = ..., prefix: str = ...,): ...
def write_usage(
self,
prog: str,
args: str = ...,
prefix: str = ...,
): ...
def write_heading(self, heading: str) -> None: ...
def write_paragraph(self) -> None: ...
def write_text(self, text: str) -> None: ...
def write_dl(self, rows: Iterable[Iterable[str]], col_max: int = ..., col_spacing: int = ...,) -> None: ...
def write_dl(self, rows: Iterable[Iterable[str]], col_max: int = ..., col_spacing: int = ...) -> None: ...
def section(self, name) -> ContextManager[None]: ...
def indentation(self) -> ContextManager[None]: ...
def getvalue(self) -> str: ...

View File

@@ -4,7 +4,7 @@ from click._termui_impl import ProgressBar as _ProgressBar
from click.core import _ConvertibleType
def hidden_prompt_func(prompt: str) -> str: ...
def _build_prompt(text: str, suffix: str, show_default: bool = ..., default: Optional[str] = ...,) -> str: ...
def _build_prompt(text: str, suffix: str, show_default: bool = ..., default: Optional[str] = ...) -> str: ...
def prompt(
text: str,
default: Optional[str] = ...,
@@ -18,11 +18,11 @@ def prompt(
show_choices: bool = ...,
) -> Any: ...
def confirm(
text: str, default: bool = ..., abort: bool = ..., prompt_suffix: str = ..., show_default: bool = ..., err: bool = ...,
text: str, default: bool = ..., abort: bool = ..., prompt_suffix: str = ..., show_default: bool = ..., err: bool = ...
) -> bool: ...
def get_terminal_size() -> Tuple[int, int]: ...
def echo_via_pager(
text_or_generator: Union[str, Iterable[str], Callable[[], Generator[str, None, None]]], color: Optional[bool] = ...,
text_or_generator: Union[str, Iterable[str], Callable[[], Generator[str, None, None]]], color: Optional[bool] = ...
) -> None: ...
_T = TypeVar("_T")

View File

@@ -52,7 +52,7 @@ class CliRunner:
def get_default_prog_name(self, cli: BaseCommand) -> str: ...
def make_env(self, overrides: Optional[Mapping[str, str]] = ...) -> Dict[str, str]: ...
def isolation(
self, input: Optional[Union[bytes, Text, IO[Any]]] = ..., env: Optional[Mapping[str, str]] = ..., color: bool = ...,
self, input: Optional[Union[bytes, Text, IO[Any]]] = ..., env: Optional[Mapping[str, str]] = ..., color: bool = ...
) -> ContextManager[BinaryIO]: ...
def invoke(
self,

View File

@@ -5,26 +5,26 @@ from typing import IO, Any, Callable, Generic, Iterable, List, Optional, Tuple a
from click.core import Context, Parameter, _ConvertibleType, _ParamType as ParamType
class BoolParamType(ParamType):
def __call__(self, value: Optional[str], param: Optional[Parameter] = ..., ctx: Optional[Context] = ...,) -> bool: ...
def convert(self, value: str, param: Optional[Parameter], ctx: Optional[Context],) -> bool: ...
def __call__(self, value: Optional[str], param: Optional[Parameter] = ..., ctx: Optional[Context] = ...) -> bool: ...
def convert(self, value: str, param: Optional[Parameter], ctx: Optional[Context]) -> bool: ...
class CompositeParamType(ParamType):
arity: int
class Choice(ParamType):
choices: Iterable[str]
def __init__(self, choices: Iterable[str], case_sensitive: bool = ...,) -> None: ...
def __init__(self, choices: Iterable[str], case_sensitive: bool = ...) -> None: ...
class DateTime(ParamType):
def __init__(self, formats: Optional[List[str]] = ...,) -> None: ...
def convert(self, value: str, param: Optional[Parameter], ctx: Optional[Context],) -> datetime.datetime: ...
def __init__(self, formats: Optional[List[str]] = ...) -> None: ...
def convert(self, value: str, param: Optional[Parameter], ctx: Optional[Context]) -> datetime.datetime: ...
class FloatParamType(ParamType):
def __call__(self, value: Optional[str], param: Optional[Parameter] = ..., ctx: Optional[Context] = ...,) -> float: ...
def convert(self, value: str, param: Optional[Parameter], ctx: Optional[Context],) -> float: ...
def __call__(self, value: Optional[str], param: Optional[Parameter] = ..., ctx: Optional[Context] = ...) -> float: ...
def convert(self, value: str, param: Optional[Parameter], ctx: Optional[Context]) -> float: ...
class FloatRange(FloatParamType):
def __init__(self, min: Optional[float] = ..., max: Optional[float] = ..., clamp: bool = ...,) -> None: ...
def __init__(self, min: Optional[float] = ..., max: Optional[float] = ..., clamp: bool = ...) -> None: ...
class File(ParamType):
def __init__(
@@ -45,12 +45,12 @@ _Func = Callable[[Optional[str]], _F]
class FuncParamType(ParamType, Generic[_F]):
func: _Func[_F]
def __init__(self, func: _Func[_F]) -> None: ...
def __call__(self, value: Optional[str], param: Optional[Parameter] = ..., ctx: Optional[Context] = ...,) -> _F: ...
def convert(self, value: str, param: Optional[Parameter], ctx: Optional[Context],) -> _F: ...
def __call__(self, value: Optional[str], param: Optional[Parameter] = ..., ctx: Optional[Context] = ...) -> _F: ...
def convert(self, value: str, param: Optional[Parameter], ctx: Optional[Context]) -> _F: ...
class IntParamType(ParamType):
def __call__(self, value: Optional[str], param: Optional[Parameter] = ..., ctx: Optional[Context] = ...,) -> int: ...
def convert(self, value: str, param: Optional[Parameter], ctx: Optional[Context],) -> int: ...
def __call__(self, value: Optional[str], param: Optional[Parameter] = ..., ctx: Optional[Context] = ...) -> int: ...
def convert(self, value: str, param: Optional[Parameter], ctx: Optional[Context]) -> int: ...
class IntRange(IntParamType):
def __init__(self, min: Optional[int] = ..., max: Optional[int] = ..., clamp: bool = ...) -> None: ...
@@ -70,24 +70,24 @@ class Path(ParamType):
path_type: Optional[Type[_PathType]] = ...,
) -> None: ...
def coerce_path_result(self, rv: Union[str, bytes]) -> _PathType: ...
def __call__(self, value: Optional[str], param: Optional[Parameter] = ..., ctx: Optional[Context] = ...,) -> _PathType: ...
def convert(self, value: str, param: Optional[Parameter], ctx: Optional[Context],) -> _PathType: ...
def __call__(self, value: Optional[str], param: Optional[Parameter] = ..., ctx: Optional[Context] = ...) -> _PathType: ...
def convert(self, value: str, param: Optional[Parameter], ctx: Optional[Context]) -> _PathType: ...
class StringParamType(ParamType):
def __call__(self, value: Optional[str], param: Optional[Parameter] = ..., ctx: Optional[Context] = ...,) -> str: ...
def convert(self, value: str, param: Optional[Parameter], ctx: Optional[Context],) -> str: ...
def __call__(self, value: Optional[str], param: Optional[Parameter] = ..., ctx: Optional[Context] = ...) -> str: ...
def convert(self, value: str, param: Optional[Parameter], ctx: Optional[Context]) -> str: ...
class Tuple(CompositeParamType):
types: List[ParamType]
def __init__(self, types: Iterable[Any]) -> None: ...
def __call__(self, value: Optional[str], param: Optional[Parameter] = ..., ctx: Optional[Context] = ...,) -> Tuple: ...
def convert(self, value: str, param: Optional[Parameter], ctx: Optional[Context],) -> Tuple: ...
def __call__(self, value: Optional[str], param: Optional[Parameter] = ..., ctx: Optional[Context] = ...) -> Tuple: ...
def convert(self, value: str, param: Optional[Parameter], ctx: Optional[Context]) -> Tuple: ...
class UnprocessedParamType(ParamType): ...
class UUIDParameterType(ParamType):
def __call__(self, value: Optional[str], param: Optional[Parameter] = ..., ctx: Optional[Context] = ...,) -> uuid.UUID: ...
def convert(self, value: str, param: Optional[Parameter], ctx: Optional[Context],) -> uuid.UUID: ...
def __call__(self, value: Optional[str], param: Optional[Parameter] = ..., ctx: Optional[Context] = ...) -> uuid.UUID: ...
def convert(self, value: str, param: Optional[Parameter], ctx: Optional[Context]) -> uuid.UUID: ...
def convert_type(ty: Optional[_ConvertibleType], default: Optional[Any] = ...) -> ParamType: ...

View File

@@ -31,7 +31,7 @@ class KeepOpenFile(Generic[AnyStr]):
def __iter__(self) -> Iterator[AnyStr]: ...
def echo(
message: object = ..., file: Optional[IO[Text]] = ..., nl: bool = ..., err: bool = ..., color: Optional[bool] = ...,
message: object = ..., file: Optional[IO[Text]] = ..., nl: bool = ..., err: bool = ..., color: Optional[bool] = ...
) -> None: ...
def get_binary_stream(name: str) -> IO[bytes]: ...
def get_text_stream(name: str, encoding: Optional[str] = ..., errors: str = ...) -> IO[str]: ...

View File

@@ -8,7 +8,7 @@ class ClassicAdapter:
action: Optional[str]
category: Type[DeprecationWarning]
def __init__(
self, reason: str = ..., version: str = ..., action: Optional[str] = ..., category: Type[DeprecationWarning] = ...,
self, reason: str = ..., version: str = ..., action: Optional[str] = ..., category: Type[DeprecationWarning] = ...
) -> None: ...
def get_deprecated_msg(self, wrapped: Callable[..., Any], instance: object) -> str: ...
def __call__(self, wrapped: _F) -> Callable[[_F], _F]: ...
@@ -17,5 +17,5 @@ class ClassicAdapter:
def deprecated(__wrapped: _F) -> _F: ...
@overload
def deprecated(
reason: str = ..., *, version: str = ..., action: Optional[str] = ..., category: Optional[Type[DeprecationWarning]] = ...,
reason: str = ..., *, version: str = ..., action: Optional[str] = ..., category: Optional[Type[DeprecationWarning]] = ...
) -> Callable[[_F], _F]: ...

View File

@@ -27,5 +27,5 @@ def versionchanged(reason: str = ..., version: str = ...) -> Callable[[_F], _F]:
def deprecated(__wrapped: _F) -> _F: ...
@overload
def deprecated(
reason: str = ..., *, version: str = ..., action: Optional[str] = ..., category: Optional[Type[DeprecationWarning]] = ...,
reason: str = ..., *, version: str = ..., action: Optional[str] = ..., category: Optional[Type[DeprecationWarning]] = ...
) -> Callable[[_F], _F]: ...

View File

@@ -39,13 +39,9 @@ _WSGICallable = Callable[[Dict[Text, Any], _StartResponse], Iterable[bytes]]
_Status = Union[str, int]
_Headers = Union[Dict[Any, Any], List[Tuple[Any, Any]]]
_Body = Union[Text, ByteString, Dict[Text, Any], Response, _WSGICallable]
_ViewFuncReturnType = Union[
_Body, Tuple[_Body, _Status, _Headers], Tuple[_Body, _Status], Tuple[_Body, _Headers],
]
_ViewFuncReturnType = Union[_Body, Tuple[_Body, _Status, _Headers], Tuple[_Body, _Status], Tuple[_Body, _Headers]]
_ViewFunc = Union[
Callable[..., NoReturn], Callable[..., _ViewFuncReturnType],
]
_ViewFunc = Union[Callable[..., NoReturn], Callable[..., _ViewFuncReturnType]]
_VT = TypeVar("_VT", bound=_ViewFunc)
class Flask(_PackageBoundObject):

View File

@@ -1,4 +1,4 @@
from google.protobuf.message import Message
class Empty(Message):
def __init__(self,) -> None: ...
def __init__(self) -> None: ...

View File

@@ -123,7 +123,7 @@ class TestAllTypesProto2(Message):
group_uint32: int
def __init__(self, group_int32: Optional[int] = ..., group_uint32: Optional[int] = ...) -> None: ...
class MessageSetCorrect(Message):
def __init__(self,) -> None: ...
def __init__(self) -> None: ...
class MessageSetCorrectExtension1(Message):
bytes: Text
def __init__(self, bytes: Optional[Text] = ...) -> None: ...

View File

@@ -52,16 +52,16 @@ class TestMessageWithCustomOptions(Message):
def __init__(self, field1: Optional[Text] = ..., oneof_field: Optional[int] = ...) -> None: ...
class CustomOptionFooRequest(Message):
def __init__(self,) -> None: ...
def __init__(self) -> None: ...
class CustomOptionFooResponse(Message):
def __init__(self,) -> None: ...
def __init__(self) -> None: ...
class CustomOptionFooClientMessage(Message):
def __init__(self,) -> None: ...
def __init__(self) -> None: ...
class CustomOptionFooServerMessage(Message):
def __init__(self,) -> None: ...
def __init__(self) -> None: ...
class DummyMessageContainingEnum(Message):
class TestEnumType(int):
@@ -77,25 +77,25 @@ class DummyMessageContainingEnum(Message):
def items(cls) -> List[Tuple[bytes, DummyMessageContainingEnum.TestEnumType]]: ...
TEST_OPTION_ENUM_TYPE1: DummyMessageContainingEnum.TestEnumType
TEST_OPTION_ENUM_TYPE2: DummyMessageContainingEnum.TestEnumType
def __init__(self,) -> None: ...
def __init__(self) -> None: ...
class DummyMessageInvalidAsOptionType(Message):
def __init__(self,) -> None: ...
def __init__(self) -> None: ...
class CustomOptionMinIntegerValues(Message):
def __init__(self,) -> None: ...
def __init__(self) -> None: ...
class CustomOptionMaxIntegerValues(Message):
def __init__(self,) -> None: ...
def __init__(self) -> None: ...
class CustomOptionOtherValues(Message):
def __init__(self,) -> None: ...
def __init__(self) -> None: ...
class SettingRealsFromPositiveInts(Message):
def __init__(self,) -> None: ...
def __init__(self) -> None: ...
class SettingRealsFromNegativeInts(Message):
def __init__(self,) -> None: ...
def __init__(self) -> None: ...
class ComplexOptionType1(Message):
foo: int
@@ -141,10 +141,10 @@ class ComplexOpt6(Message):
def __init__(self, xyzzy: Optional[int] = ...) -> None: ...
class VariousComplexOptions(Message):
def __init__(self,) -> None: ...
def __init__(self) -> None: ...
class AggregateMessageSet(Message):
def __init__(self,) -> None: ...
def __init__(self) -> None: ...
class AggregateMessageSetElement(Message):
s: Text
@@ -188,7 +188,7 @@ class NestedOptionType(Message):
class NestedMessage(Message):
nested_field: int
def __init__(self, nested_field: Optional[int] = ...) -> None: ...
def __init__(self,) -> None: ...
def __init__(self) -> None: ...
class OldOptionType(Message):
class TestEnum(int):
@@ -224,4 +224,4 @@ class NewOptionType(Message):
def __init__(self, value: NewOptionType.TestEnum) -> None: ...
class TestMessageWithRequiredEnumOption(Message):
def __init__(self,) -> None: ...
def __init__(self) -> None: ...

View File

@@ -3,7 +3,7 @@ from typing import Optional
from google.protobuf.message import Message
class TestMessageSet(Message):
def __init__(self,) -> None: ...
def __init__(self) -> None: ...
class TestMessageSetWireFormatContainer(Message):
@property

View File

@@ -270,7 +270,7 @@ class TestDeprecatedFields(Message):
def __init__(self, deprecated_int32: Optional[int] = ..., deprecated_int32_in_oneof: Optional[int] = ...) -> None: ...
class TestDeprecatedMessage(Message):
def __init__(self,) -> None: ...
def __init__(self) -> None: ...
class ForeignMessage(Message):
c: int
@@ -278,10 +278,10 @@ class ForeignMessage(Message):
def __init__(self, c: Optional[int] = ..., d: Optional[int] = ...) -> None: ...
class TestReservedFields(Message):
def __init__(self,) -> None: ...
def __init__(self) -> None: ...
class TestAllExtensions(Message):
def __init__(self,) -> None: ...
def __init__(self) -> None: ...
class OptionalGroup_extension(Message):
a: int
@@ -303,13 +303,13 @@ class TestGroup(Message):
) -> None: ...
class TestGroupExtension(Message):
def __init__(self,) -> None: ...
def __init__(self) -> None: ...
class TestNestedExtension(Message):
class OptionalGroup_extension(Message):
a: int
def __init__(self, a: Optional[int] = ...) -> None: ...
def __init__(self,) -> None: ...
def __init__(self) -> None: ...
class TestRequired(Message):
a: int
@@ -415,13 +415,13 @@ class TestForeignNested(Message):
def __init__(self, foreign_nested: Optional[TestAllTypes.NestedMessage] = ...) -> None: ...
class TestEmptyMessage(Message):
def __init__(self,) -> None: ...
def __init__(self) -> None: ...
class TestEmptyMessageWithExtensions(Message):
def __init__(self,) -> None: ...
def __init__(self) -> None: ...
class TestMultipleExtensionRanges(Message):
def __init__(self,) -> None: ...
def __init__(self) -> None: ...
class TestReallyLargeTagNumber(Message):
a: int
@@ -856,10 +856,10 @@ class TestUnpackedTypes(Message):
) -> None: ...
class TestPackedExtensions(Message):
def __init__(self,) -> None: ...
def __init__(self) -> None: ...
class TestUnpackedExtensions(Message):
def __init__(self,) -> None: ...
def __init__(self) -> None: ...
class TestDynamicExtensions(Message):
class DynamicEnumType(int):
@@ -982,22 +982,22 @@ class TestCommentInjectionMessage(Message):
def __init__(self, a: Optional[Text] = ...) -> None: ...
class FooRequest(Message):
def __init__(self,) -> None: ...
def __init__(self) -> None: ...
class FooResponse(Message):
def __init__(self,) -> None: ...
def __init__(self) -> None: ...
class FooClientMessage(Message):
def __init__(self,) -> None: ...
def __init__(self) -> None: ...
class FooServerMessage(Message):
def __init__(self,) -> None: ...
def __init__(self) -> None: ...
class BarRequest(Message):
def __init__(self,) -> None: ...
def __init__(self) -> None: ...
class BarResponse(Message):
def __init__(self,) -> None: ...
def __init__(self) -> None: ...
class TestJsonName(Message):
field_name1: int

View File

@@ -246,4 +246,4 @@ class ForeignMessage(Message):
def __init__(self, c: Optional[int] = ...) -> None: ...
class TestEmptyMessage(Message):
def __init__(self,) -> None: ...
def __init__(self) -> None: ...

View File

@@ -47,7 +47,7 @@ class FunctionLoader(BaseLoader):
load_func: Any
def __init__(self, load_func) -> None: ...
def get_source(
self, environment: Environment, template: Text,
self, environment: Environment, template: Text
) -> Tuple[Text, Optional[Text], Optional[Callable[..., Any]]]: ...
class PrefixLoader(BaseLoader):

View File

@@ -2,8 +2,8 @@
from typing import Any, Iterable, Optional, Text
def colored(
text: Text, color: Optional[Text] = ..., on_color: Optional[Text] = ..., attrs: Optional[Iterable[Text]] = ...,
text: Text, color: Optional[Text] = ..., on_color: Optional[Text] = ..., attrs: Optional[Iterable[Text]] = ...
) -> Text: ...
def cprint(
text: Text, color: Optional[Text] = ..., on_color: Optional[Text] = ..., attrs: Optional[Iterable[Text]] = ..., **kwargs: Any,
text: Text, color: Optional[Text] = ..., on_color: Optional[Text] = ..., attrs: Optional[Iterable[Text]] = ..., **kwargs: Any
) -> None: ...

View File

@@ -32,6 +32,6 @@ def dump(
sort_keys: bool = ...,
indent: int = ...,
) -> None: ...
def decode(s: AnyStr, precise_float: bool = ...,) -> Any: ...
def loads(s: AnyStr, precise_float: bool = ...,) -> Any: ...
def load(fp: IO[AnyStr], precise_float: bool = ...,) -> Any: ...
def decode(s: AnyStr, precise_float: bool = ...) -> Any: ...
def loads(s: AnyStr, precise_float: bool = ...) -> Any: ...
def load(fp: IO[AnyStr], precise_float: bool = ...) -> Any: ...

View File

@@ -21,7 +21,7 @@ class HeaderRewriterFix(object):
remove_headers: Set[Text]
add_headers: List[Text]
def __init__(
self, app: WSGIApplication, remove_headers: Optional[Iterable[Text]] = ..., add_headers: Optional[Iterable[Text]] = ...,
self, app: WSGIApplication, remove_headers: Optional[Iterable[Text]] = ..., add_headers: Optional[Iterable[Text]] = ...
) -> None: ...
def __call__(self, environ: WSGIEnvironment, start_response: StartResponse) -> Iterable[bytes]: ...

View File

@@ -148,10 +148,7 @@ class UnavailableForLegalReasons(HTTPException):
class InternalServerError(HTTPException):
def __init__(
self,
description: Optional[Text] = ...,
response: Optional[Response] = ...,
original_exception: Optional[Exception] = ...,
self, description: Optional[Text] = ..., response: Optional[Response] = ..., original_exception: Optional[Exception] = ...
) -> None: ...
code: int
description: Text

View File

@@ -25,11 +25,11 @@ _F = TypeVar("_F", bound=Callable[..., Any])
class _StreamFactory(Protocol):
def __call__(
self, total_content_length: Optional[int], filename: str, content_type: str, content_length: Optional[int] = ...,
self, total_content_length: Optional[int], filename: str, content_type: str, content_length: Optional[int] = ...
) -> IO[bytes]: ...
def default_stream_factory(
total_content_length: Optional[int], filename: str, content_type: str, content_length: Optional[int] = ...,
total_content_length: Optional[int], filename: str, content_type: str, content_length: Optional[int] = ...
) -> IO[bytes]: ...
def parse_form_data(
environ: WSGIEnvironment,
@@ -64,7 +64,7 @@ class FormDataParser(object):
def get_parse_func(self, mimetype: str, options: Any) -> Optional[_ParseFunc]: ...
def parse_from_environ(self, environ: WSGIEnvironment) -> Tuple[IO[bytes], _Dict, _Dict]: ...
def parse(
self, stream: IO[bytes], mimetype: Text, content_length: Optional[int], options: Optional[Mapping[str, str]] = ...,
self, stream: IO[bytes], mimetype: Text, content_length: Optional[int], options: Optional[Mapping[str, str]] = ...
) -> Tuple[IO[bytes], _Dict, _Dict]: ...
parse_functions: Dict[Text, _ParseFunc]
@@ -91,12 +91,12 @@ class MultiPartParser(object):
def get_part_encoding(self, headers: Mapping[str, str]) -> Optional[str]: ...
def get_part_charset(self, headers: Mapping[str, str]) -> Text: ...
def start_file_streaming(
self, filename: Union[Text, bytes], headers: Mapping[str, str], total_content_length: Optional[int],
self, filename: Union[Text, bytes], headers: Mapping[str, str], total_content_length: Optional[int]
) -> Tuple[Text, IO[bytes]]: ...
def in_memory_threshold_reached(self, bytes: Any) -> NoReturn: ...
def validate_boundary(self, boundary: Optional[str]) -> None: ...
def parse_lines(
self, file: Any, boundary: bytes, content_length: int, cap_at_buffer: bool = ...,
self, file: Any, boundary: bytes, content_length: int, cap_at_buffer: bool = ...
) -> Generator[Tuple[str, Any], None, None]: ...
def parse_parts(self, file: Any, boundary: bytes, content_length: int) -> Generator[Tuple[str, Any], None, None]: ...
def parse(self, file: Any, boundary: bytes, content_length: int) -> Tuple[_Dict, _Dict]: ...

View File

@@ -8,7 +8,7 @@ class ProxyMiddleware(object):
app: WSGIApplication
targets: Dict[Text, _MutableOpts]
def __init__(
self, app: WSGIApplication, targets: Mapping[Text, _MutableOpts], chunk_size: int = ..., timeout: int = ...,
self, app: WSGIApplication, targets: Mapping[Text, _MutableOpts], chunk_size: int = ..., timeout: int = ...
) -> None: ...
def proxy_to(self, opts: _Opts, path: Text, prefix: Text) -> WSGIApplication: ...
def __call__(self, environ: WSGIEnvironment, start_response: StartResponse) -> Iterable[bytes]: ...

View File

@@ -55,7 +55,7 @@ class LintMiddleware(object):
def __init__(self, app: WSGIApplication) -> None: ...
def check_environ(self, environ: WSGIEnvironment) -> None: ...
def check_start_response(
self, status: str, headers: List[Tuple[str, str]], exc_info: Optional[Tuple[Any, ...]],
self, status: str, headers: List[Tuple[str, str]], exc_info: Optional[Tuple[Any, ...]]
) -> Tuple[int, Headers]: ...
def check_headers(self, headers: Mapping[str, str]) -> None: ...
def check_iterator(self, app_iter: Iterable[bytes]) -> None: ...

View File

@@ -14,7 +14,7 @@ class AiofilesContextManager(Generic[_V_co, _T_co, _T_contra]):
def __init__(self, __coro: Coroutine[_V_co, _T_co, _T_contra]) -> None: ...
def send(self, __value: _T_contra) -> _T_co: ...
def throw(
self, __typ: Type[BaseException], __val: Union[BaseException, object] = ..., tb: Optional[TracebackType] = ...,
self, __typ: Type[BaseException], __val: Union[BaseException, object] = ..., tb: Optional[TracebackType] = ...
) -> _T_co: ...
def close(self) -> None: ...
@property
@@ -30,5 +30,5 @@ class AiofilesContextManager(Generic[_V_co, _T_co, _T_contra]):
async def __anext__(self) -> Coroutine[_V_co, _T_co, _T_contra]: ...
async def __aenter__(self) -> Coroutine[_V_co, _T_co, _T_contra]: ...
async def __aexit__(
self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType],
self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType]
) -> None: ...

View File

@@ -13,14 +13,14 @@ class FrozenDateTimeFactory(object):
def __init__(self, time_to_freeze: datetime) -> None: ...
def __call__(self) -> datetime: ...
def tick(self, delta: Union[float, Real, timedelta] = ...) -> None: ...
def move_to(self, target_datetime: Optional[_Freezable],) -> None: ...
def move_to(self, target_datetime: Optional[_Freezable]) -> None: ...
class StepTickTimeFactory(object):
def __init__(self, time_to_freeze: datetime, step_width: float) -> None: ...
def __call__(self) -> datetime: ...
def tick(self, delta: Optional[timedelta] = ...) -> None: ...
def update_step_width(self, step_width: float) -> None: ...
def move_to(self, target_datetime: Optional[_Freezable],) -> None: ...
def move_to(self, target_datetime: Optional[_Freezable]) -> None: ...
class _freeze_time:
def __init__(
@@ -38,13 +38,13 @@ class _freeze_time:
def __call__(self, func: Callable[..., Awaitable[_T]]) -> Callable[..., Awaitable[_T]]: ...
@overload
def __call__(self, func: Callable[..., _T]) -> Callable[..., _T]: ...
def __enter__(self,) -> Union[StepTickTimeFactory, TickingDateTimeFactory, FrozenDateTimeFactory]: ...
def __enter__(self) -> Union[StepTickTimeFactory, TickingDateTimeFactory, FrozenDateTimeFactory]: ...
def __exit__(self) -> None: ...
def start(self,) -> Union[StepTickTimeFactory, TickingDateTimeFactory, FrozenDateTimeFactory]: ...
def start(self) -> Union[StepTickTimeFactory, TickingDateTimeFactory, FrozenDateTimeFactory]: ...
def stop(self) -> None: ...
def decorate_class(self, klass: Type[_T]) -> _T: ...
def decorate_coroutine(self, coroutine: _T) -> _T: ...
def decorate_callable(self, func: Callable[..., _T],) -> Callable[..., _T]: ...
def decorate_callable(self, func: Callable[..., _T]) -> Callable[..., _T]: ...
def freeze_time(
time_to_freeze: Optional[Union[_Freezable, Callable[..., _Freezable], Iterator[_Freezable]]] = ...,

View File

@@ -2,7 +2,7 @@ from typing import Any, Callable, Optional, Union
__version__: str
def dumps(__obj: Any, default: Optional[Callable[[Any], Any]] = ..., option: Optional[int] = ...,) -> bytes: ...
def dumps(__obj: Any, default: Optional[Callable[[Any], Any]] = ..., option: Optional[int] = ...) -> bytes: ...
def loads(__obj: Union[bytes, bytearray, str]) -> Any: ...
class JSONDecodeError(ValueError): ...