|
1 | 1 | import typing as t
|
2 | 2 | from _typeshed import Incomplete
|
3 | 3 |
|
4 |
| -import click |
| 4 | +_Group = Incomplete # must be replaced by click.Group after implementing of https://github.com/python/typeshed/issues/5768 |
| 5 | +_Command = Incomplete # must be replaced by click.Command after implementing of GH-5768 |
| 6 | +_Context = Incomplete # must be replaced by click.Context after implementing of GH-5768 |
| 7 | +_HelpFormatter = Incomplete # must be replaced by click.HelpFormatter after implementing of GH-5768 |
5 | 8 |
|
6 | 9 | __version__: str
|
7 | 10 |
|
8 |
| -class DefaultGroup(click.Group): |
| 11 | +class DefaultGroup(_Group): |
9 | 12 | ignore_unknown_options: bool
|
10 | 13 | default_cmd_name: str
|
11 | 14 | default_if_no_args: bool
|
12 | 15 | def __init__(self, *args, **kwargs) -> None: ...
|
13 | 16 | def set_default_command(self, command: str) -> None: ...
|
14 |
| - def parse_args(self, ctx: click.Context, args: list[str]) -> list[str]: ... |
15 |
| - def get_command(self, ctx: click.Context, cmd_name: str) -> click.Command | None: ... |
16 |
| - def resolve_command(self, ctx: click.Context, args: list[str]) -> tuple[str | None, click.Command | None, list[str]]: ... |
17 |
| - def format_commands(self, ctx: click.Context, formatter: click.HelpFormatter) -> None: ... |
18 |
| - def command(self, *args, **kwargs) -> click.Command: ... # incomplete |
| 17 | + def parse_args(self, ctx: _Context, args: list[str]) -> list[str]: ... |
| 18 | + def get_command(self, ctx: _Context, cmd_name: str) -> _Command | None: ... |
| 19 | + def resolve_command(self, ctx: _Context, args: list[str]) -> tuple[str | None, _Command | None, list[str]]: ... |
| 20 | + def format_commands(self, ctx: _Context, formatter: _HelpFormatter) -> None: ... |
| 21 | + def command(self, *args, **kwargs) -> _Command: ... # incomplete |
19 | 22 |
|
20 | 23 | class DefaultCommandFormatter:
|
21 |
| - group: click.Group |
22 |
| - formatter: click.HelpFormatter |
| 24 | + group: _Group |
| 25 | + formatter: _HelpFormatter |
23 | 26 | mark: str
|
24 |
| - def __init__(self, group: click.Group, formatter: click.HelpFormatter, mark: str = ...) -> None: ... |
| 27 | + def __init__(self, group: _Group, formatter: _HelpFormatter, mark: str = ...) -> None: ... |
25 | 28 | def write_dl(self, rows: t.Sequence[tuple[str, str]], col_max: int = ..., col_spacing: int = ...) -> None: ...
|
26 | 29 | def __getattr__(self, attr: str) -> Incomplete: ...
|
27 | 30 | # __getattr__ used to ala-derive from click.HelpFormatter:
|
|
0 commit comments