mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
apply black and isort (#4287)
* apply black and isort * move some type ignores
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Generated by pytype, with only minor tweaks. Might be incomplete.
|
||||
import sys
|
||||
from typing import Any, AnyStr, Callable, Dict, IO, Iterable, List, Mapping, Optional, Sequence, Tuple, Union, overload
|
||||
from typing import IO, Any, AnyStr, Callable, Dict, Iterable, List, Mapping, Optional, Sequence, Tuple, Union, overload
|
||||
|
||||
# See https://groups.google.com/forum/#!topic/python-ideas/gA1gdj3RZ5g
|
||||
if sys.version_info >= (3,):
|
||||
@@ -14,6 +14,7 @@ SUPPRESS_USAGE: _Text
|
||||
|
||||
def check_builtin(option: Option, opt: Any, value: _Text) -> Any: ...
|
||||
def check_choice(option: Option, opt: Any, value: _Text) -> Any: ...
|
||||
|
||||
if sys.version_info < (3,):
|
||||
def isbasestring(x: Any) -> bool: ...
|
||||
|
||||
@@ -35,10 +36,8 @@ class OptionError(OptParseError):
|
||||
def __init__(self, msg: _Text, option: Option) -> None: ...
|
||||
|
||||
class OptionConflictError(OptionError): ...
|
||||
|
||||
class OptionValueError(OptParseError): ...
|
||||
|
||||
|
||||
class HelpFormatter:
|
||||
NO_DEFAULT_VALUE: _Text
|
||||
_long_opt_fmt: _Text
|
||||
@@ -71,20 +70,16 @@ class HelpFormatter:
|
||||
def store_option_strings(self, parser: OptionParser) -> None: ...
|
||||
|
||||
class IndentedHelpFormatter(HelpFormatter):
|
||||
def __init__(self,
|
||||
indent_increment: int = ...,
|
||||
max_help_position: int = ...,
|
||||
width: Optional[int] = ...,
|
||||
short_first: int = ...) -> None: ...
|
||||
def __init__(
|
||||
self, indent_increment: int = ..., max_help_position: int = ..., width: Optional[int] = ..., short_first: int = ...
|
||||
) -> None: ...
|
||||
def format_heading(self, heading: _Text) -> _Text: ...
|
||||
def format_usage(self, usage: _Text) -> _Text: ...
|
||||
|
||||
class TitledHelpFormatter(HelpFormatter):
|
||||
def __init__(self,
|
||||
indent_increment: int = ...,
|
||||
max_help_position: int = ...,
|
||||
width: Optional[int] = ...,
|
||||
short_first: int = ...) -> None: ...
|
||||
def __init__(
|
||||
self, indent_increment: int = ..., max_help_position: int = ..., width: Optional[int] = ..., short_first: int = ...
|
||||
) -> None: ...
|
||||
def format_heading(self, heading: _Text) -> _Text: ...
|
||||
def format_usage(self, usage: _Text) -> _Text: ...
|
||||
|
||||
@@ -184,17 +179,19 @@ class OptionParser(OptionContainer):
|
||||
usage: Optional[_Text]
|
||||
values: Optional[Values]
|
||||
version: _Text
|
||||
def __init__(self,
|
||||
usage: Optional[_Text] = ...,
|
||||
option_list: Iterable[Option] = ...,
|
||||
option_class: Option = ...,
|
||||
version: Optional[_Text] = ...,
|
||||
conflict_handler: _Text = ...,
|
||||
description: Optional[_Text] = ...,
|
||||
formatter: Optional[HelpFormatter] = ...,
|
||||
add_help_option: bool = ...,
|
||||
prog: Optional[_Text] = ...,
|
||||
epilog: Optional[_Text] = ...) -> None: ...
|
||||
def __init__(
|
||||
self,
|
||||
usage: Optional[_Text] = ...,
|
||||
option_list: Iterable[Option] = ...,
|
||||
option_class: Option = ...,
|
||||
version: Optional[_Text] = ...,
|
||||
conflict_handler: _Text = ...,
|
||||
description: Optional[_Text] = ...,
|
||||
formatter: Optional[HelpFormatter] = ...,
|
||||
add_help_option: bool = ...,
|
||||
prog: Optional[_Text] = ...,
|
||||
epilog: Optional[_Text] = ...,
|
||||
) -> None: ...
|
||||
def _add_help_option(self) -> None: ...
|
||||
def _add_version_option(self) -> None: ...
|
||||
def _create_option_list(self) -> None: ...
|
||||
@@ -224,7 +221,9 @@ class OptionParser(OptionContainer):
|
||||
def get_prog_name(self) -> _Text: ...
|
||||
def get_usage(self) -> _Text: ...
|
||||
def get_version(self) -> _Text: ...
|
||||
def parse_args(self, args: Optional[Sequence[AnyStr]] = ..., values: Optional[Values] = ...) -> Tuple[Values, List[AnyStr]]: ...
|
||||
def parse_args(
|
||||
self, args: Optional[Sequence[AnyStr]] = ..., values: Optional[Values] = ...
|
||||
) -> Tuple[Values, List[AnyStr]]: ...
|
||||
def print_usage(self, file: Optional[IO[str]] = ...) -> None: ...
|
||||
def print_help(self, file: Optional[IO[str]] = ...) -> None: ...
|
||||
def print_version(self, file: Optional[IO[str]] = ...) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user