mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 04:25:50 +08:00
Click: Make group and command decorators return the correct types (#2331)
This commit is contained in:
committed by
Jelle Zijlstra
parent
dc9f9db77f
commit
99f25d0cd3
Vendored
+2
-2
@@ -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]:
|
||||
...
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -41,7 +41,7 @@ def command(
|
||||
short_help: Optional[str] = ...,
|
||||
options_metavar: str = ...,
|
||||
add_help_option: bool = ...,
|
||||
) -> Callable[[_F], _F]:
|
||||
) -> Callable[[Callable], Command]:
|
||||
...
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ def group(
|
||||
add_help_option: bool = ...,
|
||||
# User-defined
|
||||
**kwargs: Any,
|
||||
) -> Callable[[_F], _F]:
|
||||
) -> Callable[[Callable], Group]:
|
||||
...
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user