Add missing attributes, fix some parameter types in argparse.Action. (#1907)

This commit is contained in:
rchen152
2018-02-28 11:20:04 -08:00
committed by Jelle Zijlstra
parent a618ee30d4
commit e1243d0103

View File

@@ -115,20 +115,30 @@ if sys.version_info >= (3,):
class MetavarTypeHelpFormatter(HelpFormatter): ...
class Action:
option_strings: Sequence[_Text]
dest: _Text
nargs: Optional[Union[int, _Text]]
const: Any
default: Any
type: Optional[Union[Callable[[str], Any], FileType]]
choices: Optional[Iterable[Any]]
required: bool
help: Optional[_Text]
metavar: Optional[Union[_Text, Tuple[_Text, ...]]]
def __init__(self,
option_strings: Sequence[_Text],
dest: _Text = ...,
nargs: Optional[Union[int, _Text]] = ...,
const: Any = ...,
default: Any = ...,
type: Union[Callable[[str], _T], FileType, None] = ...,
type: Optional[Union[Callable[[str], _T], FileType]] = ...,
choices: Optional[Iterable[_T]] = ...,
required: bool = ...,
help: Optional[_Text] = ...,
metavar: Union[_Text, Tuple[_Text, ...]] = ...) -> None: ...
metavar: Optional[Union[_Text, Tuple[_Text, ...]]] = ...) -> None: ...
def __call__(self, parser: ArgumentParser, namespace: Namespace,
values: Union[_Text, Sequence[Any], None],
option_string: _Text = ...) -> None: ...
option_string: Optional[_Text] = ...) -> None: ...
class Namespace:
def __init__(self, **kwargs: Any) -> None: ...