mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Add missing attributes, fix some parameter types in argparse.Action. (#1907)
This commit is contained in:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user