Make metavar in argparse be Optional (#2739)

This commit is contained in:
cormoran
2019-01-13 20:09:06 +09:00
committed by Sebastian Rittau
parent ee20595996
commit 632eadc894

View File

@@ -62,7 +62,7 @@ class _ActionsContainer:
choices: Iterable[_T] = ...,
required: bool = ...,
help: Optional[_Text] = ...,
metavar: Union[_Text, Tuple[_Text, ...]] = ...,
metavar: Optional[Union[_Text, Tuple[_Text, ...]]] = ...,
dest: Optional[_Text] = ...,
version: _Text = ...,
**kwargs: Any) -> Action: ...
@@ -248,7 +248,7 @@ class Action(_AttributeHolder):
choices: Optional[Iterable[Any]]
required: bool
help: Optional[_Text]
metavar: Union[_Text, Tuple[_Text, ...]]
metavar: Optional[Union[_Text, Tuple[_Text, ...]]]
def __init__(self,
option_strings: Sequence[_Text],