Skip to content

Click: Make group and command decorators return the correct types #2331

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 2 commits into from
Jul 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions third_party/2and3/click/core.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -293,10 +293,10 @@ class Group(MultiCommand):
def add_command(self, cmd: Command, name: Optional[str] = ...):
...

def command(self, *args, **kwargs) -> Callable[[_F], _F]:
def command(self, *args, **kwargs) -> Callable[[Callable], Command]:
...

def group(self, *args, **kwargs) -> Callable[[_F], _F]:
def group(self, *args, **kwargs) -> Callable[[Callable], Group]:
...


Expand Down
4 changes: 2 additions & 2 deletions third_party/2and3/click/decorators.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def command(
short_help: Optional[str] = ...,
options_metavar: str = ...,
add_help_option: bool = ...,
) -> Callable[[_F], _F]:
) -> Callable[[Callable], Command]:
...


Expand All @@ -66,7 +66,7 @@ def group(
add_help_option: bool = ...,
# User-defined
**kwargs: Any,
) -> Callable[[_F], _F]:
) -> Callable[[Callable], Group]:
...


Expand Down