8000 replace all click interfaces with Incomplete until implementation of … · python/typeshed@edb82a7 · GitHub
[go: up one dir, main page]

Skip to content

Commit edb82a7

Browse files
committed
replace all click interfaces with Incomplete until implementation of GH-5768
1 parent 927abac commit edb82a7

File tree

2 files changed

+14
-11
lines changed
< 10000 span class="prc-TooltipV2-Tooltip-cYMVY" data-direction="s" aria-hidden="true" id=":R3t5dab:">Filter options

2 files changed

+14
-11
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
version = "1.2.*"
2-
requires = ["click"]
2+
requires = []
33

44
[tool.stubtest]
55
ignore_missing_stub = false

stubs/click-default-group/click_default_group.pyi

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,30 @@
11
import typing as t
22
from _typeshed import Incomplete
33

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
58

69
__version__: str
710

8-
class DefaultGroup(click.Group):
11+
class DefaultGroup(_Group):
912
ignore_unknown_options: bool
1013
default_cmd_name: str
1114
default_if_no_args: bool
1215
def __init__(self, *args, **kwargs) -> None: ...
1316
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
1922

2023
class DefaultCommandFormatter:
21-
group: click.Group
22-
formatter: click.HelpFormatter
24+
group: _Group
25+
formatter: _HelpFormatter
2326
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: ...
2528
def write_dl(self, rows: t.Sequence[tuple[str, str]], col_max: int = ..., col_spacing: int = ...) -> None: ...
2629
def __getattr__(self, attr: str) -> Incomplete: ...
2730
# __getattr__ used to ala-derive from click.HelpFormatter:

0 commit comments

Comments
 (0)
0