mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-15 16:27:08 +08:00
A couple new definitions, some more unicode for 2.7 (#185)
* Action.__init__(); ArgumentParser.__init__() & print_help()
* pprint() & pformat()
* added unicode support to url{parse,split,join,defrag}
* add unicode support to requests.api
This commit is contained in:
committed by
Guido van Rossum
parent
eab591bb08
commit
0be5a11496
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any, Sequence, Union
|
||||
from typing import Any, Callable, Dict, List, IO, Iterable, Sequence, Union
|
||||
|
||||
SUPPRESS = ... # type: Any
|
||||
OPTIONAL = ... # type: Any
|
||||
@@ -52,8 +52,17 @@ class Action(_AttributeHolder):
|
||||
required = ... # type: Any
|
||||
help = ... # type: Any
|
||||
metavar = ... # type: Any
|
||||
def __init__(self, option_strings, dest, nargs=..., const=..., default=..., type=...,
|
||||
choices=..., required=..., help=..., metavar=...): ...
|
||||
def __init__(self,
|
||||
option_strings: List[str],
|
||||
dest = str,
|
||||
nargs: Union[int, str] = ...,
|
||||
const: Any = ...,
|
||||
default: Any = ...,
|
||||
type: Callable[[str], Any] = ...,
|
||||
choices: Iterable[Any] = ...,
|
||||
required: bool = ...,
|
||||
help: str = ...,
|
||||
metavar: str = ...) -> None: ...
|
||||
def __call__(self, parser, namespace, values, option_string=...): ...
|
||||
|
||||
class _StoreAction(Action):
|
||||
@@ -138,7 +147,7 @@ class _ActionsContainer:
|
||||
version: str = ...
|
||||
) -> None: ...
|
||||
def add_argument_group(self, *args, **kwargs): ...
|
||||
def add_mutually_exclusive_group(self, **kwargs): ...
|
||||
def add_mutually_exclusive_group(self, **kwargs) -> _MutuallyExclusiveGroup: ...
|
||||
|
||||
class _ArgumentGroup(_ActionsContainer):
|
||||
title = ... # type: Any
|
||||
@@ -156,9 +165,19 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
|
||||
formatter_class = ... # type: Any
|
||||
fromfile_prefix_chars = ... # type: Any
|
||||
add_help = ... # type: Any
|
||||
def __init__(self, prog=..., usage=..., description=..., epilog=..., version=...,
|
||||
parents=..., formatter_class=..., prefix_chars=..., fromfile_prefix_chars=...,
|
||||
argument_default=..., conflict_handler=..., add_help=...): ...
|
||||
def __init__(self,
|
||||
prog: str = ...,
|
||||
usage: str = ...,
|
||||
description: str = ...,
|
||||
epilog: str = ...,
|
||||
version: None = ...,
|
||||
parents: Iterable[ArgumentParser] = ...,
|
||||
formatter_class: HelpFormatter = ...,
|
||||
prefix_chars: str = ...,
|
||||
fromfile_prefix_chars: str = ...,
|
||||
argument_default: str = ...,
|
||||
conflict_handler: str = ...,
|
||||
add_help: bool = ...) -> None: ...
|
||||
def add_subparsers(self, **kwargs): ...
|
||||
def parse_args(self, args: Sequence[str] = ..., namespace=...): ...
|
||||
def parse_known_args(self, args=..., namespace=...): ...
|
||||
@@ -167,7 +186,7 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
|
||||
def format_help(self): ...
|
||||
def format_version(self): ...
|
||||
def print_usage(self, file=...): ...
|
||||
def print_help(self, file=...): ...
|
||||
def print_help(self, file: IO[Any] = None) -> None: ...
|
||||
def print_version(self, file=...): ...
|
||||
def exit(self, status=..., message=...): ...
|
||||
def error(self, message): ...
|
||||
|
||||
Reference in New Issue
Block a user