-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add stubs for click-default-group #9304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
7345dbc
Add stubs for click-default-group
pyhedgehog d39549c
make stubtest happy: remove __getattr__-derived methods from DefaultC…
pyhedgehog 927abac
requires = ["click"] to click-default-group/METADATA.toml
pyhedgehog edb82a7
replace all click interfaces with Incomplete until implementation of …
pyhedgehog 75d9a70
Merge remote-tracking branch 'upstream/main' into click-default-group
AlexWaygood 96908e1
Revert "replace all click interfaces with Incomplete until implementa…
AlexWaygood de90d51
Merge branch 'main' into click-default-group
AlexWaygood f860741
Remove redundant setting in METADATA.toml
AlexWaygood 3361b6d
unnecessary blank line
AlexWaygood 9662337
add upstream url
AlexWaygood dfb6dcc
Merge branch 'main' into click-default-group
AlexWaygood a59b2e6
.
AlexWaygood 6f1489c
fixes
AlexWaygood 495cb40
pin
AlexWaygood 7b531fc
lint
AlexWaygood File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
Add stubs for click-default-group
- Loading branch information
commit 7345dbc5d376fa876b15446321eeca2cd48e9a55
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
version = "1.2.*" | ||
|
||
[tool.stubtest] | ||
ignore_missing_stub = false | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import typing as t | ||
|
||
import click | ||
|
||
__version__: str | ||
|
||
class DefaultGroup(click.Group): | ||
ignore_unknown_options: bool | ||
default_cmd_name: str | ||
AlexWaygood marked this conversation as resolved.
Show resolved
Hide resolved
|
||
default_if_no_args: bool | ||
def __init__(self, *args, **kwargs) -> None: ... | ||
def set_default_command(self, command: str) -> None: ... | ||
AlexWaygood marked this conversation as resolved.
Show resolved
Hide resolved
|
||
def parse_args(self, ctx: click.Context, args: list[str]) -> list: ... | ||
def get_command(self, ctx: click.Context, cmd_name: str) -> click.Command | None: ... | ||
def resolve_command(self, ctx: click.Context, args: list[str]) -> tuple[str | None, click.Command | None, list[str]]: ... | ||
def format_commands(self, ctx: click.Context, formatter: click.HelpFormatter) -> None: ... | ||
def command(self, *args, **kwargs) -> click.Command: ... # incomplete | ||
|
||
class DefaultCommandFormatter: | ||
group: click.Group | ||
formatter: click.HelpFormatter | ||
mark: str | ||
def __init__(self, group: click.Group, formatter: click.HelpFormatter, mark: str) -> None: ... | ||
def write_dl(self, rows: t.Sequence[tuple[str, str]], col_max: int = ..., col_spacing: int = ...) -> None: ... | ||
AlexWaygood marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# def __getattr__(self, attr: str) -> t.Any: ... | ||
# __getattr__ used to ala-derive from click.HelpFormatter: | ||
indent_increment: int | ||
width: t.Optional[int] | ||
current_indent: int | ||
buffer: t.List[str] | ||
def write(self, string: str) -> None: ... | ||
def indent(self) -> None: ... | ||
def dedent(self) -> None: ... | ||
def write_usage(self, prog: str, args: str = ..., prefix: str | None = ...) -> None: ... | ||
def write_heading(self, heading: str) -> None: ... | ||
def write_paragraph(self) -> None: ... | ||
def write_text(self, text: str) -> None: ... | ||
def section(self, name: str) -> t.Iterator[None]: ... | ||
def indentation(self) -> t.Iterator[None]: ... | ||
def getvalue(self) -> str: ... |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.