massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / stdlib / 2and3 / optparse.pyi
diff --git a/.config/coc/extensions/coc-python-data/languageServer.0.5.59/Typeshed/stdlib/2and3/optparse.pyi b/.config/coc/extensions/coc-python-data/languageServer.0.5.59/Typeshed/stdlib/2and3/optparse.pyi
new file mode 100644 (file)
index 0000000..3fee7dd
--- /dev/null
@@ -0,0 +1,227 @@
+# Generated by pytype, with only minor tweaks. Might be incomplete.\r
+import sys\r
+from typing import Any, Callable, Dict, IO, Iterable, List, Mapping, Optional, Sequence, Tuple, Union\r
+\r
+# See https://groups.google.com/forum/#!topic/python-ideas/gA1gdj3RZ5g\r
+if sys.version_info >= (3,):\r
+    _Text = str\r
+else:\r
+    _Text = Union[str, unicode]\r
+\r
+NO_DEFAULT = ...  # type: Tuple[_Text, ...]\r
+SUPPRESS_HELP = ...  # type: _Text\r
+SUPPRESS_USAGE = ...  # type: _Text\r
+\r
+def check_builtin(option: Option, opt: Any, value: _Text) -> Any: ...\r
+def check_choice(option: Option, opt: Any, value: _Text) -> Any: ...\r
+if sys.version_info < (3,):\r
+    def isbasestring(x: Any) -> bool: ...\r
+\r
+class OptParseError(Exception):\r
+    msg = ...  # type: _Text\r
+    def __init__(self, msg: _Text) -> None: ...\r
+\r
+class BadOptionError(OptParseError):\r
+    opt_str = ...  # type: _Text\r
+    def __init__(self, opt_str: _Text) -> None: ...\r
+\r
+class AmbiguousOptionError(BadOptionError):\r
+    possibilities = ...  # type: Iterable[_Text]\r
+    def __init__(self, opt_str: _Text, possibilities: Sequence[_Text]) -> None: ...\r
+\r
+class OptionError(OptParseError):\r
+    msg = ...  # type: _Text\r
+    option_id = ...  # type: _Text\r
+    def __init__(self, msg: _Text, option: Option) -> None: ...\r
+\r
+class OptionConflictError(OptionError): ...\r
+\r
+class OptionValueError(OptParseError): ...\r
+\r
+\r
+class HelpFormatter:\r
+    NO_DEFAULT_VALUE = ...  # type: _Text\r
+    _long_opt_fmt = ...  # type: _Text\r
+    _short_opt_fmt = ...  # type: _Text\r
+    current_indent = ...  # type: int\r
+    default_tag = ...  # type: _Text\r
+    help_position = ...  # type: Any\r
+    help_width = ...  # type: Any\r
+    indent_increment = ...  # type: int\r
+    level = ...  # type: int\r
+    max_help_position = ...  # type: int\r
+    option_strings = ...  # type: Dict[Option, _Text]\r
+    parser = ...  # type: OptionParser\r
+    short_first = ...  # type: Any\r
+    width = ...  # type: int\r
+    def __init__(self, indent_increment: int, max_help_position: int, width: Optional[int], short_first: int) -> None: ...\r
+    def _format__Text(self, _Text: _Text) -> _Text: ...\r
+    def dedent(self) -> None: ...\r
+    def expand_default(self, option: Option) -> _Text: ...\r
+    def format_description(self, description: _Text) -> _Text: ...\r
+    def format_epilog(self, epilog) -> _Text: ...\r
+    def format_heading(self, heading: Any) -> _Text: ...\r
+    def format_option(self, option: OptionParser) -> _Text: ...\r
+    def format_option_strings(self, option: OptionParser) -> Any: ...\r
+    def format_usage(self, usage: Any) -> _Text: ...\r
+    def indent(self) -> None: ...\r
+    def set_long_opt_delimiter(self, delim: _Text) -> None: ...\r
+    def set_parser(self, parser: OptionParser) -> None: ...\r
+    def set_short_opt_delimiter(self, delim: _Text) -> None: ...\r
+    def store_option_strings(self, parser: OptionParser) -> None: ...\r
+\r
+class IndentedHelpFormatter(HelpFormatter):\r
+    def __init__(self,\r
+                 indent_increment: int = ...,\r
+                 max_help_position: int = ...,\r
+                 width: Optional[int] = ...,\r
+                 short_first: int = ...) -> None: ...\r
+    def format_heading(self, heading: _Text) -> _Text: ...\r
+    def format_usage(self, usage: _Text) -> _Text: ...\r
+\r
+class TitledHelpFormatter(HelpFormatter):\r
+    def __init__(self,\r
+                 indent_increment: int = ...,\r
+                 max_help_position: int = ...,\r
+                 width: Optional[int] = ...,\r
+                 short_first: int = ...) -> None: ...\r
+    def format_heading(self, heading: _Text) -> _Text: ...\r
+    def format_usage(self, usage: _Text) -> _Text: ...\r
+\r
+class Option:\r
+    ACTIONS = ...  # type: Tuple[_Text, ...]\r
+    ALWAYS_TYPED_ACTIONS = ...  # type: Tuple[_Text, ...]\r
+    ATTRS = ...  # type: List[_Text]\r
+    CHECK_METHODS = ...  # type: Optional[List[Callable]]\r
+    CONST_ACTIONS = ...  # type: Tuple[_Text, ...]\r
+    STORE_ACTIONS = ...  # type: Tuple[_Text, ...]\r
+    TYPED_ACTIONS = ...  # type: Tuple[_Text, ...]\r
+    TYPES = ...  # type: Tuple[_Text, ...]\r
+    TYPE_CHECKER = ...  # type: Dict[_Text, Callable]\r
+    _long_opts = ...  # type: List[_Text]\r
+    _short_opts = ...  # type: List[_Text]\r
+    action = ...  # type: _Text\r
+    dest = ...  # type: Any\r
+    nargs = ...  # type: int\r
+    type = ...  # type: Any\r
+    def __init__(self, *opts, **attrs) -> None: ...\r
+    def _check_action(self) -> None: ...\r
+    def _check_callback(self) -> None: ...\r
+    def _check_choice(self) -> None: ...\r
+    def _check_const(self) -> None: ...\r
+    def _check_dest(self) -> None: ...\r
+    def _check_nargs(self) -> None: ...\r
+    def _check_opt_strings(self, opts: Optional[_Text]) -> Any: ...\r
+    def _check_type(self) -> None: ...\r
+    def _set_attrs(self, attrs: Dict[_Text, Any]) -> None: ...\r
+    def _set_opt_strings(self, opts: _Text) -> None: ...\r
+    def check_value(self, opt: Any, value: Any) -> Any: ...\r
+    def convert_value(self, opt: Any, value: Any) -> Any: ...\r
+    def get_opt_string(self) -> _Text: ...\r
+    def process(self, opt: Any, value: Any, values: Any, parser: OptionParser) -> int: ...\r
+    def take_action(self, action: _Text, dest: _Text, opt: Any, value: Any, values: Any, parser: OptionParser) -> int: ...\r
+    def takes_value(self) -> bool: ...\r
+\r
+make_option = Option\r
+\r
+class OptionContainer:\r
+    _long_opt = ...  # type: Dict[_Text, Option]\r
+    _short_opt = ...  # type: Dict[_Text, Option]\r
+    conflict_handler = ...  # type: _Text\r
+    defaults = ...  # type: Dict[_Text, Any]\r
+    description = ...  # type: Any\r
+    option_class = ...  # type: Any\r
+    def __init__(self, option_class: Option, conflict_handler: Any, description: Any) -> None: ...\r
+    def _check_conflict(self, option: Any) -> None: ...\r
+    def _create_option_mappings(self) -> None: ...\r
+    def _share_option_mappings(self, parser: OptionParser) -> None: ...\r
+    def add_option(self, *args, **kwargs) -> Any: ...\r
+    def add_options(self, option_list: Iterable[Option]) -> None: ...\r
+    def destroy(self) -> None: ...\r
+    def format_description(self, formatter: Optional[HelpFormatter]) -> Any: ...\r
+    def format_help(self, formatter: Optional[HelpFormatter]) -> _Text: ...\r
+    def format_option_help(self, formatter: Optional[HelpFormatter]) -> _Text: ...\r
+    def get_description(self) -> Any: ...\r
+    def get_option(self, opt_str: _Text) -> Optional[Option]: ...\r
+    def has_option(self, opt_str: _Text) -> bool: ...\r
+    def remove_option(self, opt_str: _Text) -> None: ...\r
+    def set_conflict_handler(self, handler: Any) -> None: ...\r
+    def set_description(self, description: Any) -> None: ...\r
+\r
+class OptionGroup(OptionContainer):\r
+    option_list = ...  # type: List[Option]\r
+    parser = ...  # type: OptionParser\r
+    title = ...  # type: _Text\r
+    def __init__(self, parser: OptionParser, title: _Text, description: Optional[_Text] = ...) -> None: ...\r
+    def _create_option_list(self) -> None: ...\r
+    def set_title(self, title: _Text) -> None: ...\r
+\r
+class OptionParser(OptionContainer):\r
+    allow_interspersed_args = ...  # type: bool\r
+    epilog = ...  # type: Any\r
+    formatter = ...  # type: HelpFormatter\r
+    largs = ...  # type: Optional[List[_Text]]\r
+    option_groups = ...  # type: List[OptionParser]\r
+    option_list = ...  # type: List[Any]\r
+    process_default_values = ...  # type: Any\r
+    prog = ...  # type: Any\r
+    rargs = ...  # type: Optional[List[Any]]\r
+    standard_option_list = ...  # type: List\r
+    usage = ...  # type: Optional[_Text]\r
+    values = ...  # type: Any\r
+    version = ...  # type: _Text\r
+    def __init__(self, usage: Optional[_Text] = ...,\r
+                       option_list: Iterable[Option] = ...,\r
+                       option_class: Option = ...,\r
+                       version: Optional[_Text] = ...,\r
+                       conflict_handler: _Text = ...,\r
+                       description: Optional[_Text] = ...,\r
+                       formatter: Optional[HelpFormatter] = ...,\r
+                       add_help_option: bool = ...,\r
+                       prog: Optional[_Text] = ...,\r
+                       epilog: Optional[_Text] = ...) -> None: ...\r
+    def _add_help_option(self) -> None: ...\r
+    def _add_version_option(self) -> None: ...\r
+    def _create_option_list(self) -> None: ...\r
+    def _get_all_options(self) -> List[Any]: ...\r
+    def _get_args(self, args: Iterable) -> List[Any]: ...\r
+    def _init_parsing_state(self) -> None: ...\r
+    def _match_long_opt(self, opt: _Text) -> _Text: ...\r
+    def _populate_option_list(self, option_list: Iterable[Option], add_help: bool = ...) -> None: ...\r
+    def _process_args(self, largs: List, rargs: List, values: Values) -> None: ...\r
+    def _process_long_opt(self, rargs: List, values: Any) -> None: ...\r
+    def _process_short_opts(self, rargs: List, values: Any) -> None: ...\r
+    def add_option_group(self, *args, **kwargs) -> OptionParser: ...\r
+    def check_values(self, values: Any, args) -> Tuple[Any, ...]: ...\r
+    def disable_interspersed_args(self) -> None: ...\r
+    def enable_interspersed_args(self) -> None: ...\r
+    def error(self, msg: _Text) -> None: ...\r
+    def exit(self, status: int = ..., msg: Optional[str] = ...) -> None: ...\r
+    def expand_prog_name(self, s: Optional[_Text]) -> Any: ...\r
+    def format_epilog(self, formatter: HelpFormatter) -> Any: ...\r
+    def format_help(self, formatter: Optional[HelpFormatter] = ...) -> _Text: ...\r
+    def format_option_help(self, formatter: Optional[HelpFormatter] = ...) -> _Text: ...\r
+    def get_default_values(self) -> Values: ...\r
+    def get_option_group(self, opt_str: _Text) -> Any: ...\r
+    def get_prog_name(self) -> _Text: ...\r
+    def get_usage(self) -> _Text: ...\r
+    def get_version(self) -> _Text: ...\r
+    def parse_args(self, args: Optional[Sequence[_Text]] = ..., values: Optional[Values] = ...) -> Tuple[Any, ...]: ...\r
+    def print_usage(self, file: Optional[IO[str]] = ...) -> None: ...\r
+    def print_help(self, file: Optional[IO[str]] = ...) -> None: ...\r
+    def print_version(self, file: Optional[IO[str]] = ...) -> None: ...\r
+    def set_default(self, dest: Any, value: Any) -> None: ...\r
+    def set_defaults(self, **kwargs) -> None: ...\r
+    def set_process_default_values(self, process: Any) -> None: ...\r
+    def set_usage(self, usage: _Text) -> None: ...\r
+\r
+\r
+class Values:\r
+    def __init__(self, defaults: Optional[Mapping[str, Any]] = ...) -> None: ...\r
+    def _update(self, dict: Dict[_Text, Any], mode: Any) -> None: ...\r
+    def _update_careful(self, dict: Dict[_Text, Any]) -> None: ...\r
+    def _update_loose(self, dict: Dict[_Text, Any]) -> None: ...\r
+    def ensure_value(self, attr: Any, value: Any) -> Any: ...\r
+    def read_file(self, filename: _Text, mode: _Text) -> None: ...\r
+    def read_module(self, modname: _Text, mode: _Text) -> None: ...\r
+    def __getattr__(self, name: str) -> Any: ...\r