Improve return value of ArgumentParser.parse_args

See https://github.com/python/typeshed/issues/25
This commit is contained in:
Matthias Kramm
2015-11-11 16:31:35 -08:00
parent 87f4f54000
commit 54b49839fc
2 changed files with 3 additions and 1 deletions

View File

@@ -105,6 +105,7 @@ class Namespace(_AttributeHolder):
def __eq__(self, other): ...
def __ne__(self, other): ...
def __contains__(self, key): ...
def __getitem__(self, key: str) -> Any: ...
class _ActionsContainer:
description = ... # type: Any
@@ -150,7 +151,7 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
formatter_class=..., prefix_chars=..., fromfile_prefix_chars=...,
argument_default=..., conflict_handler=..., add_help=...): ...
def add_subparsers(self, **kwargs): ...
def parse_args(self, args: Sequence[str] = ..., namespace=...) -> Any: ...
def parse_args(self, args: Sequence[str] = ..., namespace=...) -> Namespace: ...
def parse_known_args(self, args=..., namespace=...): ...
def convert_arg_line_to_args(self, arg_line): ...
def format_usage(self): ...