Skip to content

Commit 99f25d0

Browse files
eurestiJelleZijlstra
authored andcommitted
Click: Make group and command decorators return the correct types (#2331)
1 parent dc9f9db commit 99f25d0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

third_party/2and3/click/core.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,10 +293,10 @@ class Group(MultiCommand):
293293
def add_command(self, cmd: Command, name: Optional[str] = ...):
294294
...
295295

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

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

302302

third_party/2and3/click/decorators.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def command(
4141
short_help: Optional[str] = ...,
4242
options_metavar: str = ...,
4343
add_help_option: bool = ...,
44-
) -> Callable[[_F], _F]:
44+
) -> Callable[[Callable], Command]:
4545
...
4646

4747

@@ -66,7 +66,7 @@ def group(
6666
add_help_option: bool = ...,
6767
# User-defined
6868
**kwargs: Any,
69-
) -> Callable[[_F], _F]:
69+
) -> Callable[[Callable], Group]:
7070
...
7171

7272

0 commit comments

Comments
 (0)