-
Notifications
You must be signed in to change notification settings - Fork 659
/
Copy path_decorators.pyi
73 lines (66 loc) · 1.9 KB
/
_decorators.pyi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
from typing import Any
from typing import Callable
from typing import Dict
from typing import List
from typing import NamedTuple
from typing import Optional
from typing import Tuple
from typing import Type
from typing import TypeVar
from typing import Union
from typing import overload
import click
from ._core import _FC
from ._core import AnyCallable
from ._core import OptionGroup
class OptionStackItem(NamedTuple):
param_decls: Tuple[str, ...]
attrs: Dict[str, Any]
param_count: int
class _NotAttachedOption(click.Option):
def __init__(self, param_decls: Any = ..., *, all_not_attached_options: Any, **attrs: Any) -> None: ...
def handle_parse_result(self, ctx: click.Context, opts: Any, args: List[str]) -> Any: ...
_GrpType = TypeVar("_GrpType", bound=OptionGroup)
class _OptGroup:
def __init__(self) -> None: ...
def __call__(
self,
name: str,
*,
help: Optional[str] = None,
cls: Optional[Type[_GrpType]] = None,
**attrs: Any,
) -> Union[click.Command, Callable[[AnyCallable], click.Command]]: ...
@overload
def group(
self,
name: str,
*,
cls: type[_GrpType],
**attrs: Any,
) -> Callable[[AnyCallable], click.Command]: ...
@overload
def group(
self,
name: str,
cls: None,
**attrs: Any,
) -> Callable[[AnyCallable], click.Command]: ...
@overload
def group(
self,
*,
name: str,
**attrs: Any,
) -> Callable[[AnyCallable], click.Command]: ...
@overload
def group(
self,
name: Optional[str] = ...,
*,
help: Optional[str] = ...,
cls: Optional[Type[_GrpType]] = None,
**attrs: Any,
) -> Union[click.Command, Callable[[AnyCallable], click.Command]]: ...
def option(self, *param_decls: Any, **attrs: Any) -> Callable[[_FC], _FC]: ...
optgroup: _OptGroup = ...