mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-09 21:12:25 +08:00
Change numerous default values to ... (#1722)
This is the convention, and some default values (e.g. strings) apparently break pytype.
This commit is contained in:
committed by
Matthias Kramm
parent
66821993f6
commit
54dd6ba27c
6
third_party/2/dateutil/parser.pyi
vendored
6
third_party/2/dateutil/parser.pyi
vendored
@@ -27,13 +27,13 @@ class parserinfo(object):
|
||||
def validate(self, res: datetime) -> bool: ...
|
||||
|
||||
class parser(object):
|
||||
def __init__(self, info: Optional[parserinfo] = None) -> None: ...
|
||||
def __init__(self, info: Optional[parserinfo] = ...) -> None: ...
|
||||
def parse(self, timestr: Union[str, unicode, IO[unicode]],
|
||||
default: Optional[datetime] = None,
|
||||
default: Optional[datetime] = ...,
|
||||
ignoretz: bool = ..., tzinfos: Optional[Dict[Union[str, unicode], tzinfo]] = None,
|
||||
**kwargs: Any) -> datetime: ...
|
||||
|
||||
DEFAULTPARSER = ... # type: parser
|
||||
def parse(timestr: Union[str, unicode, IO[unicode]],
|
||||
parserinfo: Optional[parserinfo] = None,
|
||||
parserinfo: Optional[parserinfo] = ...,
|
||||
**kwargs: Any) -> datetime: ...
|
||||
|
||||
@@ -6,7 +6,7 @@ from .descriptor_pool import DescriptorPool
|
||||
|
||||
class MessageFactory:
|
||||
pool = ... # type: Any
|
||||
def __init__(self, pool: Optional[DescriptorPool] = None) -> None: ...
|
||||
def __init__(self, pool: Optional[DescriptorPool] = ...) -> None: ...
|
||||
def GetPrototype(self, descriptor: Descriptor) -> Type[Message]: ...
|
||||
def GetMessages(self, files: Iterable[str]) -> Dict[str, Type[Message]]: ...
|
||||
|
||||
|
||||
4
third_party/2/werkzeug/wrappers.pyi
vendored
4
third_party/2/werkzeug/wrappers.pyi
vendored
@@ -82,8 +82,8 @@ class BaseResponse:
|
||||
headers: Optional[Union[Headers,
|
||||
Mapping[basestring, basestring],
|
||||
Sequence[Tuple[basestring, basestring]]]] = None,
|
||||
mimetype: Optional[basestring] = None,
|
||||
content_type: Optional[basestring] = None,
|
||||
mimetype: Optional[basestring] = ...,
|
||||
content_type: Optional[basestring] = ...,
|
||||
direct_passthrough: Optional[bool] = False) -> None: ...
|
||||
def call_on_close(self, func): ...
|
||||
@classmethod
|
||||
|
||||
2
third_party/2and3/atomicwrites/__init__.pyi
vendored
2
third_party/2and3/atomicwrites/__init__.pyi
vendored
@@ -9,7 +9,7 @@ class AtomicWriter(object):
|
||||
def __init__(self, path: AnyStr, mode: Text='w', overwrite: bool=False) -> None: ...
|
||||
def open(self) -> ContextManager[IO]: ...
|
||||
def _open(self, get_fileobject: Callable) -> ContextManager[IO]: ...
|
||||
def get_fileobject(self, dir: Optional[AnyStr] = None, **kwargs) -> IO: ...
|
||||
def get_fileobject(self, dir: Optional[AnyStr] = ..., **kwargs) -> IO: ...
|
||||
def sync(self, f: IO) -> None: ...
|
||||
def commit(self, f: IO) -> None: ...
|
||||
def rollback(self, f: IO) -> None: ...
|
||||
|
||||
2
third_party/2and3/boto/s3/__init__.pyi
vendored
2
third_party/2and3/boto/s3/__init__.pyi
vendored
@@ -8,7 +8,7 @@ from boto.regioninfo import RegionInfo
|
||||
from typing import List, Type, Text
|
||||
|
||||
class S3RegionInfo(RegionInfo):
|
||||
def connect(self, name: Optional[Text] = None, endpoint: Optional[str] = None, connection_cls: Optional[Type[AWSAuthConnection]] = None, **kw_params) -> S3Connection: ...
|
||||
def connect(self, name: Optional[Text] = ..., endpoint: Optional[str] = ..., connection_cls: Optional[Type[AWSAuthConnection]] = None, **kw_params) -> S3Connection: ...
|
||||
|
||||
def regions() -> List[S3RegionInfo]: ...
|
||||
def connect_to_region(region_name: Text, **kw_params): ...
|
||||
|
||||
18
third_party/2and3/characteristic/__init__.pyi
vendored
18
third_party/2and3/characteristic/__init__.pyi
vendored
@@ -13,10 +13,10 @@ _T = TypeVar('_T')
|
||||
|
||||
def attributes(
|
||||
attrs: Sequence[Union[AnyStr, Attribute]],
|
||||
apply_with_cmp: bool = True,
|
||||
apply_with_init: bool = True,
|
||||
apply_with_repr: bool = True,
|
||||
apply_immutable: bool = False,
|
||||
apply_with_cmp: bool = ...,
|
||||
apply_with_init: bool = ...,
|
||||
apply_with_repr: bool = ...,
|
||||
apply_immutable: bool = ...,
|
||||
store_attributes: Optional[Callable[[type, Attribute], Any]] = None,
|
||||
**kw: Optional[dict]) -> Callable[[Type[_T]], Type[_T]]: ...
|
||||
|
||||
@@ -24,11 +24,11 @@ class Attribute:
|
||||
def __init__(
|
||||
self,
|
||||
name: AnyStr,
|
||||
exclude_from_cmp: bool = False,
|
||||
exclude_from_init: bool = False,
|
||||
exclude_from_repr: bool = False,
|
||||
exclude_from_immutable: bool = False,
|
||||
exclude_from_cmp: bool = ...,
|
||||
exclude_from_init: bool = ...,
|
||||
exclude_from_repr: bool = ...,
|
||||
exclude_from_immutable: bool = ...,
|
||||
default_value: Any = NOTHING,
|
||||
default_factory: Optional[Callable[[None], Any]] = None,
|
||||
instance_of: Optional[Any] = None,
|
||||
instance_of: Optional[Any] = ...,
|
||||
init_aliaser: Optional[Callable[[AnyStr], AnyStr]] = strip_leading_underscores) -> None: ...
|
||||
|
||||
102
third_party/2and3/click/core.pyi
vendored
102
third_party/2and3/click/core.pyi
vendored
@@ -30,7 +30,7 @@ def invoke_param_callback(
|
||||
|
||||
@contextmanager
|
||||
def augment_usage_errors(
|
||||
ctx: 'Context', param: Optional['Parameter'] = None
|
||||
ctx: 'Context', param: Optional['Parameter'] = ...
|
||||
) -> Generator[None, None, None]:
|
||||
...
|
||||
|
||||
@@ -73,25 +73,25 @@ class Context:
|
||||
def __init__(
|
||||
self,
|
||||
command: 'Command',
|
||||
parent: Optional['Context'] = None,
|
||||
info_name: Optional[str] = None,
|
||||
obj: Optional[Any] = None,
|
||||
auto_envvar_prefix: Optional[str] = None,
|
||||
parent: Optional['Context'] = ...,
|
||||
info_name: Optional[str] = ...,
|
||||
obj: Optional[Any] = ...,
|
||||
auto_envvar_prefix: Optional[str] = ...,
|
||||
default_map: Optional[Mapping[str, Any]] = None,
|
||||
terminal_width: Optional[int] = None,
|
||||
max_content_width: Optional[int] = None,
|
||||
resilient_parsing: bool = False,
|
||||
allow_extra_args: Optional[bool] = None,
|
||||
allow_interspersed_args: Optional[bool] = None,
|
||||
ignore_unknown_options: Optional[bool] = None,
|
||||
terminal_width: Optional[int] = ...,
|
||||
max_content_width: Optional[int] = ...,
|
||||
resilient_parsing: bool = ...,
|
||||
allow_extra_args: Optional[bool] = ...,
|
||||
allow_interspersed_args: Optional[bool] = ...,
|
||||
ignore_unknown_options: Optional[bool] = ...,
|
||||
help_option_names: Optional[List[str]] = None,
|
||||
token_normalize_func: Optional[Callable[[str], str]] = None,
|
||||
color: Optional[bool] = None
|
||||
color: Optional[bool] = ...
|
||||
) -> None:
|
||||
...
|
||||
|
||||
@contextmanager
|
||||
def scope(self, cleanup: bool = True) -> Generator['Context', None, None]:
|
||||
def scope(self, cleanup: bool = ...) -> Generator['Context', None, None]:
|
||||
...
|
||||
|
||||
def make_formatter(self) -> HelpFormatter:
|
||||
@@ -147,7 +147,7 @@ class BaseCommand:
|
||||
name: str
|
||||
context_settings: Dict
|
||||
|
||||
def __init__(self, name: str, context_settings: Optional[Dict] = None) -> None:
|
||||
def __init__(self, name: str, context_settings: Optional[Dict] = ...) -> None:
|
||||
...
|
||||
|
||||
def get_usage(self, ctx: Context) -> str:
|
||||
@@ -157,7 +157,7 @@ class BaseCommand:
|
||||
...
|
||||
|
||||
def make_context(
|
||||
self, info_name: str, args: List[str], parent: Optional[Context] = None, **extra
|
||||
self, info_name: str, args: List[str], parent: Optional[Context] = ..., **extra
|
||||
) -> Context:
|
||||
...
|
||||
|
||||
@@ -170,9 +170,9 @@ class BaseCommand:
|
||||
def main(
|
||||
self,
|
||||
args: Optional[List[str]] = None,
|
||||
prog_name: Optional[str] = None,
|
||||
complete_var: Optional[str] = None,
|
||||
standalone_mode: bool = True,
|
||||
prog_name: Optional[str] = ...,
|
||||
complete_var: Optional[str] = ...,
|
||||
standalone_mode: bool = ...,
|
||||
**extra
|
||||
) -> Any:
|
||||
...
|
||||
@@ -193,14 +193,14 @@ class Command(BaseCommand):
|
||||
def __init__(
|
||||
self,
|
||||
name: str,
|
||||
context_settings: Optional[Dict] = None,
|
||||
callback: Optional[Callable] = None,
|
||||
context_settings: Optional[Dict] = ...,
|
||||
callback: Optional[Callable] = ...,
|
||||
params: Optional[List['Parameter']] = None,
|
||||
help: Optional[str] = None,
|
||||
epilog: Optional[str] = None,
|
||||
short_help: Optional[str] = None,
|
||||
options_metavar: str = '[OPTIONS]',
|
||||
add_help_option: bool = True
|
||||
help: Optional[str] = ...,
|
||||
epilog: Optional[str] = ...,
|
||||
short_help: Optional[str] = ...,
|
||||
options_metavar: str = ...,
|
||||
add_help_option: bool = ...
|
||||
) -> None:
|
||||
...
|
||||
|
||||
@@ -252,18 +252,18 @@ class MultiCommand(Command):
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
name: Optional[str] = None,
|
||||
invoke_without_command: bool = False,
|
||||
no_args_is_help: Optional[bool] = None,
|
||||
subcommand_metavar: Optional[str] = None,
|
||||
chain: bool = False,
|
||||
result_callback: Optional[Callable] = None,
|
||||
name: Optional[str] = ...,
|
||||
invoke_without_command: bool = ...,
|
||||
no_args_is_help: Optional[bool] = ...,
|
||||
subcommand_metavar: Optional[str] = ...,
|
||||
chain: bool = ...,
|
||||
result_callback: Optional[Callable] = ...,
|
||||
**attrs
|
||||
) -> None:
|
||||
...
|
||||
|
||||
def resultcallback(
|
||||
self, replace: bool = False
|
||||
self, replace: bool = ...
|
||||
) -> _Decorator:
|
||||
...
|
||||
|
||||
@@ -286,11 +286,11 @@ class Group(MultiCommand):
|
||||
commands: Dict[str, Command]
|
||||
|
||||
def __init__(
|
||||
self, name: Optional[str] = None, commands: Optional[Dict[str, Command]] = None, **attrs
|
||||
self, name: Optional[str] = ..., commands: Optional[Dict[str, Command]] = None, **attrs
|
||||
) -> None:
|
||||
...
|
||||
|
||||
def add_command(self, cmd: Command, name: Optional[str] = None):
|
||||
def add_command(self, cmd: Command, name: Optional[str] = ...):
|
||||
...
|
||||
|
||||
def command(self, *args, **kwargs) -> _Decorator:
|
||||
@@ -304,7 +304,7 @@ class CommandCollection(MultiCommand):
|
||||
sources: List[MultiCommand]
|
||||
|
||||
def __init__(
|
||||
self, name: Optional[str] = None, sources: Optional[List[MultiCommand]] = None, **attrs
|
||||
self, name: Optional[str] = ..., sources: Optional[List[MultiCommand]] = None, **attrs
|
||||
) -> None:
|
||||
...
|
||||
|
||||
@@ -334,13 +334,13 @@ class Parameter:
|
||||
self,
|
||||
param_decls: Optional[List[str]] = None,
|
||||
type: Optional[Union[type, 'ParamType']] = None,
|
||||
required: bool = False,
|
||||
default: Optional[Any] = None,
|
||||
required: bool = ...,
|
||||
default: Optional[Any] = ...,
|
||||
callback: Optional[Callable[[Context, 'Parameter', str], Any]] = None,
|
||||
nargs: Optional[int] = None,
|
||||
metavar: Optional[str] = None,
|
||||
expose_value: bool = True,
|
||||
is_eager: bool = False,
|
||||
nargs: Optional[int] = ...,
|
||||
metavar: Optional[str] = ...,
|
||||
expose_value: bool = ...,
|
||||
is_eager: bool = ...,
|
||||
envvar: Optional[Union[str, List[str]]] = None
|
||||
) -> None:
|
||||
...
|
||||
@@ -403,17 +403,17 @@ class Option(Parameter):
|
||||
def __init__(
|
||||
self,
|
||||
param_decls: Optional[List[str]] = None,
|
||||
show_default: bool = False,
|
||||
show_default: bool = ...,
|
||||
prompt: Union[bool, str] = False,
|
||||
confirmation_prompt: bool = False,
|
||||
hide_input: bool = False,
|
||||
is_flag: Optional[bool] = None,
|
||||
flag_value: Optional[Any] = None,
|
||||
multiple: bool = False,
|
||||
count: bool = False,
|
||||
allow_from_autoenv: bool = True,
|
||||
confirmation_prompt: bool = ...,
|
||||
hide_input: bool = ...,
|
||||
is_flag: Optional[bool] = ...,
|
||||
flag_value: Optional[Any] = ...,
|
||||
multiple: bool = ...,
|
||||
count: bool = ...,
|
||||
allow_from_autoenv: bool = ...,
|
||||
type: Optional[Union[type, 'ParamType']] = None,
|
||||
help: Optional[str] = None,
|
||||
help: Optional[str] = ...,
|
||||
**attrs
|
||||
) -> None:
|
||||
...
|
||||
@@ -426,7 +426,7 @@ class Argument(Parameter):
|
||||
def __init__(
|
||||
self,
|
||||
param_decls: Optional[List[str]] = None,
|
||||
required: Optional[bool] = None,
|
||||
required: Optional[bool] = ...,
|
||||
**attrs
|
||||
) -> None:
|
||||
...
|
||||
|
||||
192
third_party/2and3/click/decorators.pyi
vendored
192
third_party/2and3/click/decorators.pyi
vendored
@@ -21,7 +21,7 @@ def pass_obj(_T) -> _T:
|
||||
|
||||
|
||||
def make_pass_decorator(
|
||||
object_type: type, ensure: bool = False
|
||||
object_type: type, ensure: bool = ...
|
||||
) -> Callable[[_T], _T]:
|
||||
...
|
||||
|
||||
@@ -30,15 +30,15 @@ def make_pass_decorator(
|
||||
# arguments from core.pyi to help with type checking.
|
||||
|
||||
def command(
|
||||
name: Optional[str] = None,
|
||||
name: Optional[str] = ...,
|
||||
cls: type = Command,
|
||||
# Command
|
||||
context_settings: Optional[Dict] = ...,
|
||||
help: Optional[str] = None,
|
||||
epilog: Optional[str] = None,
|
||||
short_help: Optional[str] = None,
|
||||
options_metavar: str = '[OPTIONS]',
|
||||
add_help_option: bool = True,
|
||||
help: Optional[str] = ...,
|
||||
epilog: Optional[str] = ...,
|
||||
short_help: Optional[str] = ...,
|
||||
options_metavar: str = ...,
|
||||
add_help_option: bool = ...,
|
||||
) -> _Decorator:
|
||||
...
|
||||
|
||||
@@ -46,22 +46,22 @@ def command(
|
||||
# This inherits attrs from Group, MultiCommand and Command.
|
||||
|
||||
def group(
|
||||
name: Optional[str] = None,
|
||||
name: Optional[str] = ...,
|
||||
cls: type = Group,
|
||||
# Group
|
||||
commands: Optional[Dict[str, Command]] = None,
|
||||
# MultiCommand
|
||||
invoke_without_command: bool = False,
|
||||
no_args_is_help: Optional[bool] = None,
|
||||
subcommand_metavar: Optional[str] = None,
|
||||
chain: bool = False,
|
||||
result_callback: Optional[Callable] = None,
|
||||
invoke_without_command: bool = ...,
|
||||
no_args_is_help: Optional[bool] = ...,
|
||||
subcommand_metavar: Optional[str] = ...,
|
||||
chain: bool = ...,
|
||||
result_callback: Optional[Callable] = ...,
|
||||
# Command
|
||||
help: Optional[str] = None,
|
||||
epilog: Optional[str] = None,
|
||||
short_help: Optional[str] = None,
|
||||
options_metavar: str = '[OPTIONS]',
|
||||
add_help_option: bool = True,
|
||||
help: Optional[str] = ...,
|
||||
epilog: Optional[str] = ...,
|
||||
short_help: Optional[str] = ...,
|
||||
options_metavar: str = ...,
|
||||
add_help_option: bool = ...,
|
||||
# User-defined
|
||||
**kwargs: Any,
|
||||
) -> _Decorator:
|
||||
@@ -72,15 +72,15 @@ def argument(
|
||||
*param_decls: str,
|
||||
cls: type = Argument,
|
||||
# Argument
|
||||
required: Optional[bool] = None,
|
||||
required: Optional[bool] = ...,
|
||||
# Parameter
|
||||
type: Optional[Union[type, ParamType]] = None,
|
||||
default: Optional[Any] = None,
|
||||
default: Optional[Any] = ...,
|
||||
callback: Optional[_Callback] = ...,
|
||||
nargs: Optional[int] = None,
|
||||
metavar: Optional[str] = None,
|
||||
expose_value: bool = True,
|
||||
is_eager: bool = False,
|
||||
nargs: Optional[int] = ...,
|
||||
metavar: Optional[str] = ...,
|
||||
expose_value: bool = ...,
|
||||
is_eager: bool = ...,
|
||||
envvar: Optional[Union[str, List[str]]] = None
|
||||
) -> _Decorator:
|
||||
...
|
||||
@@ -90,25 +90,25 @@ def option(
|
||||
*param_decls: str,
|
||||
cls: type = Option,
|
||||
# Option
|
||||
show_default: bool = False,
|
||||
show_default: bool = ...,
|
||||
prompt: Union[bool, Text] = False,
|
||||
confirmation_prompt: bool = False,
|
||||
hide_input: bool = False,
|
||||
is_flag: Optional[bool] = None,
|
||||
flag_value: Optional[Any] = None,
|
||||
multiple: bool = False,
|
||||
count: bool = False,
|
||||
allow_from_autoenv: bool = True,
|
||||
confirmation_prompt: bool = ...,
|
||||
hide_input: bool = ...,
|
||||
is_flag: Optional[bool] = ...,
|
||||
flag_value: Optional[Any] = ...,
|
||||
multiple: bool = ...,
|
||||
count: bool = ...,
|
||||
allow_from_autoenv: bool = ...,
|
||||
type: Optional[Union[type, ParamType]] = None,
|
||||
help: Optional[str] = None,
|
||||
help: Optional[str] = ...,
|
||||
# Parameter
|
||||
default: Optional[Any] = None,
|
||||
required: bool = False,
|
||||
default: Optional[Any] = ...,
|
||||
required: bool = ...,
|
||||
callback: Optional[_Callback] = ...,
|
||||
nargs: Optional[int] = None,
|
||||
metavar: Optional[str] = None,
|
||||
expose_value: bool = True,
|
||||
is_eager: bool = False,
|
||||
nargs: Optional[int] = ...,
|
||||
metavar: Optional[str] = ...,
|
||||
expose_value: bool = ...,
|
||||
is_eager: bool = ...,
|
||||
envvar: Optional[Union[str, List[str]]] = None
|
||||
) -> _Decorator:
|
||||
...
|
||||
@@ -119,24 +119,24 @@ def confirmation_option(
|
||||
*param_decls: str,
|
||||
cls: type = Option,
|
||||
# Option
|
||||
show_default: bool = False,
|
||||
show_default: bool = ...,
|
||||
prompt: Union[bool, Text] = 'Do you want to continue?',
|
||||
confirmation_prompt: bool = False,
|
||||
hide_input: bool = False,
|
||||
is_flag: bool = True,
|
||||
flag_value: Optional[Any] = None,
|
||||
multiple: bool = False,
|
||||
count: bool = False,
|
||||
allow_from_autoenv: bool = True,
|
||||
confirmation_prompt: bool = ...,
|
||||
hide_input: bool = ...,
|
||||
is_flag: bool = ...,
|
||||
flag_value: Optional[Any] = ...,
|
||||
multiple: bool = ...,
|
||||
count: bool = ...,
|
||||
allow_from_autoenv: bool = ...,
|
||||
type: Optional[Union[type, ParamType]] = None,
|
||||
help: str = 'Confirm the action without prompting.',
|
||||
help: str = ...,
|
||||
# Parameter
|
||||
default: Optional[Any] = None,
|
||||
default: Optional[Any] = ...,
|
||||
callback: Optional[_Callback] = ...,
|
||||
nargs: Optional[int] = None,
|
||||
metavar: Optional[str] = None,
|
||||
expose_value: bool = False,
|
||||
is_eager: bool = False,
|
||||
nargs: Optional[int] = ...,
|
||||
metavar: Optional[str] = ...,
|
||||
expose_value: bool = ...,
|
||||
is_eager: bool = ...,
|
||||
envvar: Optional[Union[str, List[str]]] = None
|
||||
) -> _Decorator:
|
||||
...
|
||||
@@ -147,24 +147,24 @@ def password_option(
|
||||
*param_decls: str,
|
||||
cls: type = Option,
|
||||
# Option
|
||||
show_default: bool = False,
|
||||
show_default: bool = ...,
|
||||
prompt: Union[bool, Text] = True,
|
||||
confirmation_prompt: bool = True,
|
||||
hide_input: bool = True,
|
||||
is_flag: Optional[bool] = None,
|
||||
flag_value: Optional[Any] = None,
|
||||
multiple: bool = False,
|
||||
count: bool = False,
|
||||
allow_from_autoenv: bool = True,
|
||||
confirmation_prompt: bool = ...,
|
||||
hide_input: bool = ...,
|
||||
is_flag: Optional[bool] = ...,
|
||||
flag_value: Optional[Any] = ...,
|
||||
multiple: bool = ...,
|
||||
count: bool = ...,
|
||||
allow_from_autoenv: bool = ...,
|
||||
type: Optional[Union[type, ParamType]] = None,
|
||||
help: Optional[str] = None,
|
||||
help: Optional[str] = ...,
|
||||
# Parameter
|
||||
default: Optional[Any] = None,
|
||||
default: Optional[Any] = ...,
|
||||
callback: Optional[_Callback] = ...,
|
||||
nargs: Optional[int] = None,
|
||||
metavar: Optional[str] = None,
|
||||
expose_value: bool = True,
|
||||
is_eager: bool = False,
|
||||
nargs: Optional[int] = ...,
|
||||
metavar: Optional[str] = ...,
|
||||
expose_value: bool = ...,
|
||||
is_eager: bool = ...,
|
||||
envvar: Optional[Union[str, List[str]]] = None
|
||||
) -> _Decorator:
|
||||
...
|
||||
@@ -176,25 +176,25 @@ def version_option(
|
||||
*param_decls: str,
|
||||
cls: type = Option,
|
||||
# Option
|
||||
prog_name: Optional[str] = None,
|
||||
show_default: bool = False,
|
||||
prog_name: Optional[str] = ...,
|
||||
show_default: bool = ...,
|
||||
prompt: Union[bool, Text] = False,
|
||||
confirmation_prompt: bool = False,
|
||||
hide_input: bool = False,
|
||||
is_flag: bool = True,
|
||||
flag_value: Optional[Any] = None,
|
||||
multiple: bool = False,
|
||||
count: bool = False,
|
||||
allow_from_autoenv: bool = True,
|
||||
confirmation_prompt: bool = ...,
|
||||
hide_input: bool = ...,
|
||||
is_flag: bool = ...,
|
||||
flag_value: Optional[Any] = ...,
|
||||
multiple: bool = ...,
|
||||
count: bool = ...,
|
||||
allow_from_autoenv: bool = ...,
|
||||
type: Optional[Union[type, ParamType]] = None,
|
||||
help: str = 'Show the version and exit.',
|
||||
help: str = ...,
|
||||
# Parameter
|
||||
default: Optional[Any] = None,
|
||||
default: Optional[Any] = ...,
|
||||
callback: Optional[_Callback] = ...,
|
||||
nargs: Optional[int] = None,
|
||||
metavar: Optional[str] = None,
|
||||
expose_value: bool = False,
|
||||
is_eager: bool = True,
|
||||
nargs: Optional[int] = ...,
|
||||
metavar: Optional[str] = ...,
|
||||
expose_value: bool = ...,
|
||||
is_eager: bool = ...,
|
||||
envvar: Optional[Union[str, List[str]]] = None
|
||||
) -> _Decorator:
|
||||
...
|
||||
@@ -205,24 +205,24 @@ def help_option(
|
||||
*param_decls: str,
|
||||
cls: type = Option,
|
||||
# Option
|
||||
show_default: bool = False,
|
||||
show_default: bool = ...,
|
||||
prompt: Union[bool, Text] = False,
|
||||
confirmation_prompt: bool = False,
|
||||
hide_input: bool = False,
|
||||
is_flag: bool = True,
|
||||
flag_value: Optional[Any] = None,
|
||||
multiple: bool = False,
|
||||
count: bool = False,
|
||||
allow_from_autoenv: bool = True,
|
||||
confirmation_prompt: bool = ...,
|
||||
hide_input: bool = ...,
|
||||
is_flag: bool = ...,
|
||||
flag_value: Optional[Any] = ...,
|
||||
multiple: bool = ...,
|
||||
count: bool = ...,
|
||||
allow_from_autoenv: bool = ...,
|
||||
type: Optional[Union[type, ParamType]] = None,
|
||||
help: str = 'Show this message and exit.',
|
||||
help: str = ...,
|
||||
# Parameter
|
||||
default: Optional[Any] = None,
|
||||
default: Optional[Any] = ...,
|
||||
callback: Optional[_Callback] = ...,
|
||||
nargs: Optional[int] = None,
|
||||
metavar: Optional[str] = None,
|
||||
expose_value: bool = False,
|
||||
is_eager: bool = True,
|
||||
nargs: Optional[int] = ...,
|
||||
metavar: Optional[str] = ...,
|
||||
expose_value: bool = ...,
|
||||
is_eager: bool = ...,
|
||||
envvar: Optional[Union[str, List[str]]] = None
|
||||
) -> _Decorator:
|
||||
...
|
||||
|
||||
30
third_party/2and3/click/exceptions.pyi
vendored
30
third_party/2and3/click/exceptions.pyi
vendored
@@ -20,10 +20,10 @@ class ClickException(Exception):
|
||||
class UsageError(ClickException):
|
||||
ctx: Optional[Context]
|
||||
|
||||
def __init__(self, message: str, ctx: Optional[Context] = None) -> None:
|
||||
def __init__(self, message: str, ctx: Optional[Context] = ...) -> None:
|
||||
...
|
||||
|
||||
def show(self, file: Optional[IO] = None) -> None:
|
||||
def show(self, file: Optional[IO] = ...) -> None:
|
||||
...
|
||||
|
||||
|
||||
@@ -34,9 +34,9 @@ class BadParameter(UsageError):
|
||||
def __init__(
|
||||
self,
|
||||
message: str,
|
||||
ctx: Optional[Context] = None,
|
||||
param: Optional[Parameter] = None,
|
||||
param_hint: Optional[str] = None
|
||||
ctx: Optional[Context] = ...,
|
||||
param: Optional[Parameter] = ...,
|
||||
param_hint: Optional[str] = ...
|
||||
) -> None:
|
||||
...
|
||||
|
||||
@@ -46,11 +46,11 @@ class MissingParameter(BadParameter):
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
message: Optional[str] = None,
|
||||
ctx: Optional[Context] = None,
|
||||
param: Optional[Parameter] = None,
|
||||
param_hint: Optional[str] = None,
|
||||
param_type: Optional[str] = None
|
||||
message: Optional[str] = ...,
|
||||
ctx: Optional[Context] = ...,
|
||||
param: Optional[Parameter] = ...,
|
||||
param_hint: Optional[str] = ...,
|
||||
param_type: Optional[str] = ...
|
||||
) -> None:
|
||||
...
|
||||
|
||||
@@ -62,20 +62,20 @@ class NoSuchOption(UsageError):
|
||||
def __init__(
|
||||
self,
|
||||
option_name: str,
|
||||
message: Optional[str] = None,
|
||||
message: Optional[str] = ...,
|
||||
possibilities: Optional[List[str]] = None,
|
||||
ctx: Optional[Context] = None
|
||||
ctx: Optional[Context] = ...
|
||||
) -> None:
|
||||
...
|
||||
|
||||
|
||||
class BadOptionUsage(UsageError):
|
||||
def __init__(self, message: str, ctx: Optional[Context] = None) -> None:
|
||||
def __init__(self, message: str, ctx: Optional[Context] = ...) -> None:
|
||||
...
|
||||
|
||||
|
||||
class BadArgumentUsage(UsageError):
|
||||
def __init__(self, message: str, ctx: Optional[Context] = None) -> None:
|
||||
def __init__(self, message: str, ctx: Optional[Context] = ...) -> None:
|
||||
...
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ class FileError(ClickException):
|
||||
ui_filename: str
|
||||
filename: str
|
||||
|
||||
def __init__(self, filename: str, hint: Optional[str] = None) -> None:
|
||||
def __init__(self, filename: str, hint: Optional[str] = ...) -> None:
|
||||
...
|
||||
|
||||
|
||||
|
||||
22
third_party/2and3/click/formatting.pyi
vendored
22
third_party/2and3/click/formatting.pyi
vendored
@@ -17,10 +17,10 @@ def iter_rows(
|
||||
|
||||
def wrap_text(
|
||||
text: str,
|
||||
width: int = 78,
|
||||
initial_indent: str = '',
|
||||
subsequent_indent: str = '',
|
||||
preserve_paragraphs: bool = False
|
||||
width: int = ...,
|
||||
initial_indent: str = ...,
|
||||
subsequent_indent: str = ...,
|
||||
preserve_paragraphs: bool = ...
|
||||
) -> str:
|
||||
...
|
||||
|
||||
@@ -33,9 +33,9 @@ class HelpFormatter:
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
indent_increment: int = 2,
|
||||
width: Optional[int] = None,
|
||||
max_width: Optional[int] = None,
|
||||
indent_increment: int = ...,
|
||||
width: Optional[int] = ...,
|
||||
max_width: Optional[int] = ...,
|
||||
) -> None:
|
||||
...
|
||||
|
||||
@@ -51,8 +51,8 @@ class HelpFormatter:
|
||||
def write_usage(
|
||||
self,
|
||||
prog: str,
|
||||
args: str = '',
|
||||
prefix: str = 'Usage: ',
|
||||
args: str = ...,
|
||||
prefix: str = ...,
|
||||
):
|
||||
...
|
||||
|
||||
@@ -68,8 +68,8 @@ class HelpFormatter:
|
||||
def write_dl(
|
||||
self,
|
||||
rows: Iterable[Iterable[str]],
|
||||
col_max: int = 30,
|
||||
col_spacing: int = 2,
|
||||
col_max: int = ...,
|
||||
col_spacing: int = ...,
|
||||
) -> None:
|
||||
...
|
||||
|
||||
|
||||
4
third_party/2and3/click/globals.pyi
vendored
4
third_party/2and3/click/globals.pyi
vendored
@@ -2,7 +2,7 @@ from click.core import Context
|
||||
from typing import Optional
|
||||
|
||||
|
||||
def get_current_context(silent: bool = False) -> Context:
|
||||
def get_current_context(silent: bool = ...) -> Context:
|
||||
...
|
||||
|
||||
|
||||
@@ -14,5 +14,5 @@ def pop_context() -> None:
|
||||
...
|
||||
|
||||
|
||||
def resolve_color_default(color: Optional[bool] = None) -> Optional[bool]:
|
||||
def resolve_color_default(color: Optional[bool] = ...) -> Optional[bool]:
|
||||
...
|
||||
|
||||
22
third_party/2and3/click/parser.pyi
vendored
22
third_party/2and3/click/parser.pyi
vendored
@@ -37,10 +37,10 @@ class Option:
|
||||
self,
|
||||
opts: Iterable[str],
|
||||
dest: str,
|
||||
action: Optional[str] = None,
|
||||
nargs: int = 1,
|
||||
const: Optional[Any] = None,
|
||||
obj: Optional[Any] = None
|
||||
action: Optional[str] = ...,
|
||||
nargs: int = ...,
|
||||
const: Optional[Any] = ...,
|
||||
obj: Optional[Any] = ...
|
||||
) -> None:
|
||||
...
|
||||
|
||||
@@ -53,7 +53,7 @@ class Argument:
|
||||
nargs: int
|
||||
obj: Any
|
||||
|
||||
def __init__(self, dest: str, nargs: int = 1, obj: Optional[Any] = None) -> None:
|
||||
def __init__(self, dest: str, nargs: int = ..., obj: Optional[Any] = ...) -> None:
|
||||
...
|
||||
|
||||
def process(self, value: Any, state: 'ParsingState') -> None:
|
||||
@@ -79,21 +79,21 @@ class OptionParser:
|
||||
_opt_prefixes: Set[str]
|
||||
_args: List[Argument]
|
||||
|
||||
def __init__(self, ctx: Optional[Context] = None) -> None:
|
||||
def __init__(self, ctx: Optional[Context] = ...) -> None:
|
||||
...
|
||||
|
||||
def add_option(
|
||||
self,
|
||||
opts: Iterable[str],
|
||||
dest: str,
|
||||
action: Optional[str] = None,
|
||||
nargs: int = 1,
|
||||
const: Optional[Any] = None,
|
||||
obj: Optional[Any] = None
|
||||
action: Optional[str] = ...,
|
||||
nargs: int = ...,
|
||||
const: Optional[Any] = ...,
|
||||
obj: Optional[Any] = ...
|
||||
) -> None:
|
||||
...
|
||||
|
||||
def add_argument(self, dest: str, nargs: int = 1, obj: Optional[Any] = None) -> None:
|
||||
def add_argument(self, dest: str, nargs: int = ..., obj: Optional[Any] = ...) -> None:
|
||||
...
|
||||
|
||||
def parse_args(
|
||||
|
||||
110
third_party/2and3/click/termui.pyi
vendored
110
third_party/2and3/click/termui.pyi
vendored
@@ -19,33 +19,33 @@ def hidden_prompt_func(prompt: str) -> str:
|
||||
def _build_prompt(
|
||||
text: str,
|
||||
suffix: str,
|
||||
show_default: bool = False,
|
||||
default: Optional[str] = None,
|
||||
show_default: bool = ...,
|
||||
default: Optional[str] = ...,
|
||||
) -> str:
|
||||
...
|
||||
|
||||
|
||||
def prompt(
|
||||
text: str,
|
||||
default: Optional[str] = None,
|
||||
hide_input: bool = False,
|
||||
confirmation_prompt: bool = False,
|
||||
type: Optional[Any] = None,
|
||||
default: Optional[str] = ...,
|
||||
hide_input: bool = ...,
|
||||
confirmation_prompt: bool = ...,
|
||||
type: Optional[Any] = ...,
|
||||
value_proc: Optional[Callable[[Optional[str]], Any]] = None,
|
||||
prompt_suffix: str = ': ',
|
||||
show_default: bool = True,
|
||||
err: bool = False,
|
||||
prompt_suffix: str = ...,
|
||||
show_default: bool = ...,
|
||||
err: bool = ...,
|
||||
) -> Any:
|
||||
...
|
||||
|
||||
|
||||
def confirm(
|
||||
text: str,
|
||||
default: bool = False,
|
||||
abort: bool = False,
|
||||
prompt_suffix: str = ': ',
|
||||
show_default: bool = True,
|
||||
err: bool = False,
|
||||
default: bool = ...,
|
||||
abort: bool = ...,
|
||||
prompt_suffix: str = ...,
|
||||
show_default: bool = ...,
|
||||
err: bool = ...,
|
||||
) -> bool:
|
||||
...
|
||||
|
||||
@@ -54,7 +54,7 @@ def get_terminal_size() -> Tuple[int, int]:
|
||||
...
|
||||
|
||||
|
||||
def echo_via_pager(text: str, color: Optional[bool] = None) -> None:
|
||||
def echo_via_pager(text: str, color: Optional[bool] = ...) -> None:
|
||||
...
|
||||
|
||||
|
||||
@@ -64,19 +64,19 @@ _T = TypeVar('_T')
|
||||
@contextmanager
|
||||
def progressbar(
|
||||
iterable: Optional[Iterable[_T]] = None,
|
||||
length: Optional[int] = None,
|
||||
label: Optional[str] = None,
|
||||
show_eta: bool = True,
|
||||
show_percent: Optional[bool] = None,
|
||||
show_pos: bool = False,
|
||||
length: Optional[int] = ...,
|
||||
label: Optional[str] = ...,
|
||||
show_eta: bool = ...,
|
||||
show_percent: Optional[bool] = ...,
|
||||
show_pos: bool = ...,
|
||||
item_show_func: Optional[Callable[[_T], str]] = None,
|
||||
fill_char: str = '#',
|
||||
empty_char: str = '-',
|
||||
bar_template: str = '%(label)s [%(bar)s] %(info)s',
|
||||
info_sep: str = ' ',
|
||||
width: int = 36,
|
||||
file: Optional[IO] = None,
|
||||
color: Optional[bool] = None,
|
||||
fill_char: str = ...,
|
||||
empty_char: str = ...,
|
||||
bar_template: str = ...,
|
||||
info_sep: str = ...,
|
||||
width: int = ...,
|
||||
file: Optional[IO] = ...,
|
||||
color: Optional[bool] = ...,
|
||||
) -> Generator[_T, None, None]:
|
||||
...
|
||||
|
||||
@@ -87,14 +87,14 @@ def clear() -> None:
|
||||
|
||||
def style(
|
||||
text: str,
|
||||
fg: Optional[str] = None,
|
||||
bg: Optional[str] = None,
|
||||
bold: Optional[bool] = None,
|
||||
dim: Optional[bool] = None,
|
||||
underline: Optional[bool] = None,
|
||||
blink: Optional[bool] = None,
|
||||
reverse: Optional[bool] = None,
|
||||
reset: bool = True,
|
||||
fg: Optional[str] = ...,
|
||||
bg: Optional[str] = ...,
|
||||
bold: Optional[bool] = ...,
|
||||
dim: Optional[bool] = ...,
|
||||
underline: Optional[bool] = ...,
|
||||
blink: Optional[bool] = ...,
|
||||
reverse: Optional[bool] = ...,
|
||||
reset: bool = ...,
|
||||
):
|
||||
...
|
||||
|
||||
@@ -106,42 +106,42 @@ def unstyle(text: str) -> str:
|
||||
# Styling options copied from style() for nicer type checking.
|
||||
def secho(
|
||||
text: str,
|
||||
file: Optional[IO] = None,
|
||||
file: Optional[IO] = ...,
|
||||
nl: bool =True,
|
||||
err: bool = False,
|
||||
color: Optional[bool] = None,
|
||||
fg: Optional[str] = None,
|
||||
bg: Optional[str] = None,
|
||||
bold: Optional[bool] = None,
|
||||
dim: Optional[bool] = None,
|
||||
underline: Optional[bool] = None,
|
||||
blink: Optional[bool] = None,
|
||||
reverse: Optional[bool] = None,
|
||||
reset: bool = True,
|
||||
err: bool = ...,
|
||||
color: Optional[bool] = ...,
|
||||
fg: Optional[str] = ...,
|
||||
bg: Optional[str] = ...,
|
||||
bold: Optional[bool] = ...,
|
||||
dim: Optional[bool] = ...,
|
||||
underline: Optional[bool] = ...,
|
||||
blink: Optional[bool] = ...,
|
||||
reverse: Optional[bool] = ...,
|
||||
reset: bool = ...,
|
||||
):
|
||||
...
|
||||
|
||||
|
||||
def edit(
|
||||
text: Optional[str] = None,
|
||||
editor: Optional[str] = None,
|
||||
env: Optional[str] = None,
|
||||
require_save: bool = True,
|
||||
extension: str = '.txt',
|
||||
filename: Optional[str] = None,
|
||||
text: Optional[str] = ...,
|
||||
editor: Optional[str] = ...,
|
||||
env: Optional[str] = ...,
|
||||
require_save: bool = ...,
|
||||
extension: str = ...,
|
||||
filename: Optional[str] = ...,
|
||||
) -> str:
|
||||
...
|
||||
|
||||
|
||||
def launch(url: str, wait: bool = False, locate: bool = False) -> int:
|
||||
def launch(url: str, wait: bool = ..., locate: bool = ...) -> int:
|
||||
...
|
||||
|
||||
|
||||
def getchar(echo: bool = False) -> str:
|
||||
def getchar(echo: bool = ...) -> str:
|
||||
...
|
||||
|
||||
|
||||
def pause(
|
||||
info: str ='Press any key to continue ...', err: bool = False
|
||||
info: str ='Press any key to continue ...', err: bool = ...
|
||||
) -> None:
|
||||
...
|
||||
|
||||
72
third_party/2and3/click/types.pyi
vendored
72
third_party/2and3/click/types.pyi
vendored
@@ -12,8 +12,8 @@ class ParamType:
|
||||
def __call__(
|
||||
self,
|
||||
value: Optional[str],
|
||||
param: Optional[Parameter] = None,
|
||||
ctx: Optional[Context] = None,
|
||||
param: Optional[Parameter] = ...,
|
||||
ctx: Optional[Context] = ...,
|
||||
) -> Any:
|
||||
...
|
||||
|
||||
@@ -34,7 +34,7 @@ class ParamType:
|
||||
def split_envvar_value(self, rv: str) -> List[str]:
|
||||
...
|
||||
|
||||
def fail(self, message: str, param: Optional[Parameter] = None, ctx: Optional[Context] = None) -> None:
|
||||
def fail(self, message: str, param: Optional[Parameter] = ..., ctx: Optional[Context] = ...) -> None:
|
||||
...
|
||||
|
||||
|
||||
@@ -42,8 +42,8 @@ class BoolParamType(ParamType):
|
||||
def __call__(
|
||||
self,
|
||||
value: Optional[str],
|
||||
param: Optional[Parameter] = None,
|
||||
ctx: Optional[Context] = None,
|
||||
param: Optional[Parameter] = ...,
|
||||
ctx: Optional[Context] = ...,
|
||||
) -> bool:
|
||||
...
|
||||
|
||||
@@ -70,8 +70,8 @@ class FloatParamType(ParamType):
|
||||
def __call__(
|
||||
self,
|
||||
value: Optional[str],
|
||||
param: Optional[Parameter] = None,
|
||||
ctx: Optional[Context] = None,
|
||||
param: Optional[Parameter] = ...,
|
||||
ctx: Optional[Context] = ...,
|
||||
) -> float:
|
||||
...
|
||||
|
||||
@@ -91,19 +91,19 @@ class FloatRange(FloatParamType):
|
||||
class File(ParamType):
|
||||
def __init__(
|
||||
self,
|
||||
mode: str = 'r',
|
||||
encoding: Optional[str] = None,
|
||||
errors: Optional[str] = None,
|
||||
lazy: Optional[bool] = None,
|
||||
atomic: Optional[bool] = None,
|
||||
mode: str = ...,
|
||||
encoding: Optional[str] = ...,
|
||||
errors: Optional[str] = ...,
|
||||
lazy: Optional[bool] = ...,
|
||||
atomic: Optional[bool] = ...,
|
||||
) -> None:
|
||||
...
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
value: Optional[str],
|
||||
param: Optional[Parameter] = None,
|
||||
ctx: Optional[Context] = None,
|
||||
param: Optional[Parameter] = ...,
|
||||
ctx: Optional[Context] = ...,
|
||||
) -> IO:
|
||||
...
|
||||
|
||||
@@ -132,8 +132,8 @@ class FuncParamType(ParamType):
|
||||
def __call__(
|
||||
self,
|
||||
value: Optional[str],
|
||||
param: Optional[Parameter] = None,
|
||||
ctx: Optional[Context] = None,
|
||||
param: Optional[Parameter] = ...,
|
||||
ctx: Optional[Context] = ...,
|
||||
) -> _F:
|
||||
...
|
||||
|
||||
@@ -150,8 +150,8 @@ class IntParamType(ParamType):
|
||||
def __call__(
|
||||
self,
|
||||
value: Optional[str],
|
||||
param: Optional[Parameter] = None,
|
||||
ctx: Optional[Context] = None,
|
||||
param: Optional[Parameter] = ...,
|
||||
ctx: Optional[Context] = ...,
|
||||
) -> int:
|
||||
...
|
||||
|
||||
@@ -166,7 +166,7 @@ class IntParamType(ParamType):
|
||||
|
||||
class IntRange(IntParamType):
|
||||
def __init__(
|
||||
self, min: Optional[int] = None, max: Optional[int] = None, clamp: bool = False
|
||||
self, min: Optional[int] = ..., max: Optional[int] = ..., clamp: bool = ...
|
||||
) -> None:
|
||||
...
|
||||
|
||||
@@ -177,14 +177,14 @@ _PathType = TypeVar('_PathType', str, bytes)
|
||||
class Path(ParamType):
|
||||
def __init__(
|
||||
self,
|
||||
exists: bool = False,
|
||||
file_okay: bool = True,
|
||||
dir_okay: bool = True,
|
||||
writable: bool = False,
|
||||
readable: bool = True,
|
||||
resolve_path: bool = False,
|
||||
allow_dash: bool = False,
|
||||
path_type: Optional[_PathType] = None,
|
||||
exists: bool = ...,
|
||||
file_okay: bool = ...,
|
||||
dir_okay: bool = ...,
|
||||
writable: bool = ...,
|
||||
readable: bool = ...,
|
||||
resolve_path: bool = ...,
|
||||
allow_dash: bool = ...,
|
||||
path_type: Optional[_PathType] = ...,
|
||||
) -> None:
|
||||
...
|
||||
|
||||
@@ -194,8 +194,8 @@ class Path(ParamType):
|
||||
def __call__(
|
||||
self,
|
||||
value: Optional[str],
|
||||
param: Optional[Parameter] = None,
|
||||
ctx: Optional[Context] = None,
|
||||
param: Optional[Parameter] = ...,
|
||||
ctx: Optional[Context] = ...,
|
||||
) -> _PathType:
|
||||
...
|
||||
|
||||
@@ -211,8 +211,8 @@ class StringParamType(ParamType):
|
||||
def __call__(
|
||||
self,
|
||||
value: Optional[str],
|
||||
param: Optional[Parameter] = None,
|
||||
ctx: Optional[Context] = None,
|
||||
param: Optional[Parameter] = ...,
|
||||
ctx: Optional[Context] = ...,
|
||||
) -> str:
|
||||
...
|
||||
|
||||
@@ -234,8 +234,8 @@ class Tuple(CompositeParamType):
|
||||
def __call__(
|
||||
self,
|
||||
value: Optional[str],
|
||||
param: Optional[Parameter] = None,
|
||||
ctx: Optional[Context] = None,
|
||||
param: Optional[Parameter] = ...,
|
||||
ctx: Optional[Context] = ...,
|
||||
) -> Tuple:
|
||||
...
|
||||
|
||||
@@ -256,8 +256,8 @@ class UUIDParameterType(ParamType):
|
||||
def __call__(
|
||||
self,
|
||||
value: Optional[str],
|
||||
param: Optional[Parameter] = None,
|
||||
ctx: Optional[Context] = None,
|
||||
param: Optional[Parameter] = ...,
|
||||
ctx: Optional[Context] = ...,
|
||||
) -> uuid.UUID:
|
||||
...
|
||||
|
||||
@@ -270,7 +270,7 @@ class UUIDParameterType(ParamType):
|
||||
...
|
||||
|
||||
|
||||
def convert_type(ty: Any, default: Optional[Any] = None) -> ParamType:
|
||||
def convert_type(ty: Any, default: Optional[Any] = ...) -> ParamType:
|
||||
...
|
||||
|
||||
# parameter type shortcuts
|
||||
|
||||
36
third_party/2and3/click/utils.pyi
vendored
36
third_party/2and3/click/utils.pyi
vendored
@@ -16,7 +16,7 @@ def make_str(value: Any) -> str:
|
||||
...
|
||||
|
||||
|
||||
def make_default_short_help(help: str, max_length: int = 45):
|
||||
def make_default_short_help(help: str, max_length: int = ...):
|
||||
...
|
||||
|
||||
|
||||
@@ -30,10 +30,10 @@ class LazyFile:
|
||||
def __init__(
|
||||
self,
|
||||
filename: str,
|
||||
mode: str = 'r',
|
||||
encoding: Optional[str] = None,
|
||||
errors: str = 'strict',
|
||||
atomic: bool = False
|
||||
mode: str = ...,
|
||||
encoding: Optional[str] = ...,
|
||||
errors: str = ...,
|
||||
atomic: bool = ...
|
||||
) -> None:
|
||||
...
|
||||
|
||||
@@ -73,11 +73,11 @@ class KeepOpenFile:
|
||||
|
||||
|
||||
def echo(
|
||||
message: Optional[Union[bytes, Text]] = None,
|
||||
file: Optional[IO] = None,
|
||||
nl: bool = True,
|
||||
err: bool = False,
|
||||
color: Optional[bool] = None,
|
||||
message: Optional[Union[bytes, Text]] = ...,
|
||||
file: Optional[IO] = ...,
|
||||
nl: bool = ...,
|
||||
err: bool = ...,
|
||||
color: Optional[bool] = ...,
|
||||
) -> None:
|
||||
...
|
||||
|
||||
@@ -87,18 +87,18 @@ def get_binary_stream(name: str) -> IO[bytes]:
|
||||
|
||||
|
||||
def get_text_stream(
|
||||
name: str, encoding: Optional[str] = None, errors: str = 'strict'
|
||||
name: str, encoding: Optional[str] = ..., errors: str = ...
|
||||
) -> IO[str]:
|
||||
...
|
||||
|
||||
|
||||
def open_file(
|
||||
filename: str,
|
||||
mode: str = 'r',
|
||||
encoding: Optional[str] = None,
|
||||
errors: str = 'strict',
|
||||
lazy: bool = False,
|
||||
atomic: bool = False
|
||||
mode: str = ...,
|
||||
encoding: Optional[str] = ...,
|
||||
errors: str = ...,
|
||||
lazy: bool = ...,
|
||||
atomic: bool = ...
|
||||
) -> Union[IO, LazyFile, KeepOpenFile]:
|
||||
...
|
||||
|
||||
@@ -107,11 +107,11 @@ def get_os_args() -> List[str]:
|
||||
...
|
||||
|
||||
|
||||
def format_filename(filename: str, shorten: bool = False) -> str:
|
||||
def format_filename(filename: str, shorten: bool = ...) -> str:
|
||||
...
|
||||
|
||||
|
||||
def get_app_dir(
|
||||
app_name: str, roaming: bool = True, force_posix: bool = False
|
||||
app_name: str, roaming: bool = ..., force_posix: bool = ...
|
||||
) -> str:
|
||||
...
|
||||
|
||||
12
third_party/2and3/markupsafe/__init__.pyi
vendored
12
third_party/2and3/markupsafe/__init__.pyi
vendored
@@ -16,8 +16,8 @@ class Markup(text_type):
|
||||
def __rmul__(self, num: int) -> Markup: ...
|
||||
def __mod__(self, *args: Any) -> Markup: ...
|
||||
def join(self, seq: Iterable[text_type]): ...
|
||||
def split(self, sep: Optional[text_type] = None, maxsplit: int = -1) -> List[text_type]: ...
|
||||
def rsplit(self, sep: Optional[text_type] = None, maxsplit: int = -1) -> List[text_type]: ...
|
||||
def split(self, sep: Optional[text_type] = ..., maxsplit: int = -1) -> List[text_type]: ...
|
||||
def rsplit(self, sep: Optional[text_type] = ..., maxsplit: int = -1) -> List[text_type]: ...
|
||||
def splitlines(self, keepends: bool = ...) -> List[text_type]: ...
|
||||
def unescape(self) -> Text: ...
|
||||
def striptags(self) -> Text: ...
|
||||
@@ -37,13 +37,13 @@ class Markup(text_type):
|
||||
def replace(self, old: text_type, new: text_type, count: int = -1) -> Markup: ...
|
||||
def ljust(self, width: int, fillchar: text_type = ...) -> Markup: ...
|
||||
def rjust(self, width: int, fillchar: text_type = ...) -> Markup: ...
|
||||
def lstrip(self, chars: Optional[text_type] = None) -> Markup: ...
|
||||
def rstrip(self, chars: Optional[text_type] = None) -> Markup: ...
|
||||
def strip(self, chars: Optional[text_type] = None) -> Markup: ...
|
||||
def lstrip(self, chars: Optional[text_type] = ...) -> Markup: ...
|
||||
def rstrip(self, chars: Optional[text_type] = ...) -> Markup: ...
|
||||
def strip(self, chars: Optional[text_type] = ...) -> Markup: ...
|
||||
def center(self, width: int, fillchar: text_type = ...) -> Markup: ...
|
||||
def zfill(self, width: int) -> Markup: ...
|
||||
def translate(self, table: Union[Mapping[int, Union[int, text_type, None]], Sequence[Union[int, text_type, None]]]) -> Markup: ...
|
||||
def expandtabs(self, tabsize: int = 8) -> Markup: ...
|
||||
def expandtabs(self, tabsize: int = ...) -> Markup: ...
|
||||
|
||||
class EscapeFormatter(string.Formatter):
|
||||
escape = ... # type: Callable[[text_type], Markup]
|
||||
|
||||
2
third_party/2and3/pymysql/cursors.pyi
vendored
2
third_party/2and3/pymysql/cursors.pyi
vendored
@@ -22,7 +22,7 @@ class Cursor:
|
||||
def executemany(self, query: str, args) -> int: ...
|
||||
def callproc(self, procname, args=...): ...
|
||||
def fetchone(self) -> Optional[Gen]: ...
|
||||
def fetchmany(self, size: Optional[int] = None) -> Optional[Gen]: ...
|
||||
def fetchmany(self, size: Optional[int] = ...) -> Optional[Gen]: ...
|
||||
def fetchall(self) -> Optional[Tuple[Gen, ...]]: ...
|
||||
def scroll(self, value, mode=''): ...
|
||||
def __iter__(self): ...
|
||||
|
||||
8
third_party/3/six/__init__.pyi
vendored
8
third_party/3/six/__init__.pyi
vendored
@@ -84,16 +84,16 @@ def byte2int(bs: binary_type) -> int: ...
|
||||
def indexbytes(buf: binary_type, i: int) -> int: ...
|
||||
def iterbytes(buf: binary_type) -> typing.Iterator[int]: ...
|
||||
|
||||
def assertCountEqual(self: unittest.TestCase, first: Iterable[_T], second: Iterable[_T], msg: Optional[str] = None) -> None: ...
|
||||
def assertCountEqual(self: unittest.TestCase, first: Iterable[_T], second: Iterable[_T], msg: Optional[str] = ...) -> None: ...
|
||||
@overload
|
||||
def assertRaisesRegex(self: unittest.TestCase, msg: Optional[str] = None) -> Any: ...
|
||||
def assertRaisesRegex(self: unittest.TestCase, msg: Optional[str] = ...) -> Any: ...
|
||||
@overload
|
||||
def assertRaisesRegex(self: unittest.TestCase, callable_obj: Callable[..., Any], *args: Any, **kwargs: Any) -> Any: ...
|
||||
def assertRegex(self: unittest.TestCase, text: AnyStr, expected_regex: Union[AnyStr, Pattern[AnyStr]], msg: Optional[str] = None) -> None: ...
|
||||
def assertRegex(self: unittest.TestCase, text: AnyStr, expected_regex: Union[AnyStr, Pattern[AnyStr]], msg: Optional[str] = ...) -> None: ...
|
||||
|
||||
exec_ = exec
|
||||
|
||||
def reraise(tp: Optional[Type[BaseException]], value: Optional[BaseException], tb: Optional[types.TracebackType] = None) -> NoReturn: ...
|
||||
def reraise(tp: Optional[Type[BaseException]], value: Optional[BaseException], tb: Optional[types.TracebackType] = ...) -> NoReturn: ...
|
||||
def raise_from(value: BaseException, from_value: Optional[BaseException]) -> NoReturn: ...
|
||||
|
||||
print_ = print
|
||||
|
||||
4
third_party/3/werkzeug/wrappers.pyi
vendored
4
third_party/3/werkzeug/wrappers.pyi
vendored
@@ -81,8 +81,8 @@ class BaseResponse:
|
||||
headers: Optional[Union[Headers,
|
||||
Mapping[str, str],
|
||||
Sequence[Tuple[str, str]]]]=None,
|
||||
mimetype: Optional[str] = None,
|
||||
content_type: Optional[str] = None,
|
||||
mimetype: Optional[str] = ...,
|
||||
content_type: Optional[str] = ...,
|
||||
direct_passthrough: bool=False) -> None: ...
|
||||
def call_on_close(self, func): ...
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user