Add new show_choices argument to click options (#2978)

This commit is contained in:
zadamah
2019-05-09 16:28:08 +02:00
committed by Sebastian Rittau
parent 5799b8dfcf
commit c03100230d
3 changed files with 11 additions and 0 deletions

View File

@@ -439,6 +439,7 @@ class Option(Parameter):
allow_from_autoenv: bool
help: Optional[str]
show_default: bool
show_choices: bool
def __init__(
self,
@@ -454,6 +455,7 @@ class Option(Parameter):
allow_from_autoenv: bool = ...,
type: Optional[_ConvertibleType] = ...,
help: Optional[str] = ...,
show_choices: bool = ...,
**attrs
) -> None:
...

View File

@@ -109,6 +109,7 @@ def option(
allow_from_autoenv: bool = ...,
type: Optional[_ConvertibleType] = ...,
help: Optional[str] = ...,
show_choices: bool = ...,
# Parameter
default: Optional[Any] = ...,
required: bool = ...,
@@ -140,6 +141,7 @@ def option(
allow_from_autoenv: bool = ...,
type: _T = ...,
help: Optional[str] = ...,
show_choices: bool = ...,
# Parameter
default: Optional[Any] = ...,
required: bool = ...,
@@ -171,6 +173,7 @@ def option(
allow_from_autoenv: bool = ...,
type: Type[str] = ...,
help: Optional[str] = ...,
show_choices: bool = ...,
# Parameter
default: Optional[Any] = ...,
required: bool = ...,
@@ -202,6 +205,7 @@ def option(
allow_from_autoenv: bool = ...,
type: Type[int] = ...,
help: Optional[str] = ...,
show_choices: bool = ...,
# Parameter
default: Optional[Any] = ...,
required: bool = ...,
@@ -232,6 +236,7 @@ def confirmation_option(
allow_from_autoenv: bool = ...,
type: Optional[_ConvertibleType] = ...,
help: str = ...,
show_choices: bool = ...,
# Parameter
default: Optional[Any] = ...,
callback: Optional[_Callback] = ...,
@@ -259,6 +264,7 @@ def password_option(
allow_from_autoenv: bool = ...,
type: Optional[_ConvertibleType] = ...,
help: Optional[str] = ...,
show_choices: bool = ...,
# Parameter
default: Optional[Any] = ...,
callback: Optional[_Callback] = ...,
@@ -289,6 +295,7 @@ def version_option(
allow_from_autoenv: bool = ...,
type: Optional[_ConvertibleType] = ...,
help: str = ...,
show_choices: bool = ...,
# Parameter
default: Optional[Any] = ...,
callback: Optional[_Callback] = ...,
@@ -316,6 +323,7 @@ def help_option(
allow_from_autoenv: bool = ...,
type: Optional[_ConvertibleType] = ...,
help: str = ...,
show_choices: bool = ...,
# Parameter
default: Optional[Any] = ...,
callback: Optional[_Callback] = ...,

View File

@@ -39,6 +39,7 @@ def prompt(
prompt_suffix: str = ...,
show_default: bool = ...,
err: bool = ...,
show_choices: bool = ...,
) -> Any:
...