mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 20:24:30 +08:00
committed by
Jelle Zijlstra
parent
f8093d63cd
commit
018ecb3f16
2
third_party/2and3/click/README.md
vendored
2
third_party/2and3/click/README.md
vendored
@@ -1,4 +1,4 @@
|
||||
# click 6.6, Python 3
|
||||
# click 7.0
|
||||
|
||||
`__init__.pyi` is almost a copy of `click/__init__.py`. It's a shortcut module
|
||||
anyway in the actual sources so it works well with minimal changes.
|
||||
|
||||
10
third_party/2and3/click/core.pyi
vendored
10
third_party/2and3/click/core.pyi
vendored
@@ -228,6 +228,9 @@ class Command(BaseCommand):
|
||||
def make_parser(self, ctx: Context) -> OptionParser:
|
||||
...
|
||||
|
||||
def get_short_help_str(self, limit: int = ...) -> str:
|
||||
...
|
||||
|
||||
def format_help(self, ctx: Context, formatter: HelpFormatter) -> None:
|
||||
...
|
||||
|
||||
@@ -426,6 +429,9 @@ class Parameter:
|
||||
def get_usage_pieces(self, ctx: Context) -> List[str]:
|
||||
...
|
||||
|
||||
def get_error_hint(self, ctx: Context) -> str:
|
||||
...
|
||||
|
||||
|
||||
class Option(Parameter):
|
||||
prompt: str # sic
|
||||
@@ -438,8 +444,10 @@ class Option(Parameter):
|
||||
multiple: bool
|
||||
allow_from_autoenv: bool
|
||||
help: Optional[str]
|
||||
hidden: bool
|
||||
show_default: bool
|
||||
show_choices: bool
|
||||
show_envvar: bool
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
@@ -455,7 +463,9 @@ class Option(Parameter):
|
||||
allow_from_autoenv: bool = ...,
|
||||
type: Optional[_ConvertibleType] = ...,
|
||||
help: Optional[str] = ...,
|
||||
hidden: bool = ...,
|
||||
show_choices: bool = ...,
|
||||
show_envvar: bool = ...,
|
||||
**attrs
|
||||
) -> None:
|
||||
...
|
||||
|
||||
2
third_party/2and3/click/exceptions.pyi
vendored
2
third_party/2and3/click/exceptions.pyi
vendored
@@ -70,7 +70,7 @@ class NoSuchOption(UsageError):
|
||||
|
||||
|
||||
class BadOptionUsage(UsageError):
|
||||
def __init__(self, message: str, ctx: Optional[Context] = ...) -> None:
|
||||
def __init__(self, option_name: str, message: str, ctx: Optional[Context] = ...) -> None:
|
||||
...
|
||||
|
||||
|
||||
|
||||
8
third_party/2and3/click/termui.pyi
vendored
8
third_party/2and3/click/termui.pyi
vendored
@@ -10,6 +10,7 @@ from typing import (
|
||||
overload,
|
||||
Tuple,
|
||||
TypeVar,
|
||||
Union,
|
||||
)
|
||||
|
||||
from click.core import _ConvertibleType
|
||||
@@ -59,7 +60,10 @@ def get_terminal_size() -> Tuple[int, int]:
|
||||
...
|
||||
|
||||
|
||||
def echo_via_pager(text: str, color: Optional[bool] = ...) -> None:
|
||||
def echo_via_pager(
|
||||
text_or_generator: Union[str, Iterable[str], Callable[[], Generator[str, None, None]]],
|
||||
color: Optional[bool]
|
||||
) -> None:
|
||||
...
|
||||
|
||||
|
||||
@@ -127,7 +131,7 @@ def unstyle(text: str) -> str:
|
||||
|
||||
# Styling options copied from style() for nicer type checking.
|
||||
def secho(
|
||||
text: str,
|
||||
message: Optional[str] = ...,
|
||||
file: Optional[IO] = ...,
|
||||
nl: bool = ...,
|
||||
err: bool = ...,
|
||||
|
||||
11
third_party/2and3/click/testing.pyi
vendored
11
third_party/2and3/click/testing.pyi
vendored
@@ -20,25 +20,36 @@ class Result:
|
||||
exit_code: int
|
||||
exception: Any
|
||||
exc_info: Optional[Any]
|
||||
stdout_bytes: bytes
|
||||
stderr_bytes: bytes
|
||||
def __init__(
|
||||
self,
|
||||
runner: CliRunner,
|
||||
stdout_bytes: bytes,
|
||||
stderr_bytes: bytes,
|
||||
exit_code: int,
|
||||
exception: Any,
|
||||
exc_info: Optional[Any] = ...,
|
||||
) -> None: ...
|
||||
@property
|
||||
def output(self) -> Text: ...
|
||||
@property
|
||||
def stdout(self) -> Text: ...
|
||||
@property
|
||||
def stderr(self) -> Text: ...
|
||||
|
||||
class CliRunner:
|
||||
charset: str
|
||||
env: Mapping[str, str]
|
||||
echo_stdin: bool
|
||||
mix_stderr: bool
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
charset: Optional[Text] = ...,
|
||||
env: Optional[Mapping[str, str]] = ...,
|
||||
echo_stdin: bool = ...,
|
||||
mix_stderr: bool = ...,
|
||||
) -> None:
|
||||
...
|
||||
def get_default_prog_name(self, cli: BaseCommand) -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user