Make the signature of optparse.OptionParser.parse_args more precise. (#2464)

This commit is contained in:
Rebecca Chen
2018-09-25 21:15:10 -07:00
committed by Jelle Zijlstra
parent cfa52c7c38
commit 9fda6b20ec

View File

@@ -1,6 +1,6 @@
# Generated by pytype, with only minor tweaks. Might be incomplete.
import sys
from typing import Any, Callable, Dict, IO, Iterable, List, Mapping, Optional, Sequence, Tuple, Union
from typing import Any, AnyStr, Callable, Dict, IO, Iterable, List, Mapping, Optional, Sequence, Tuple, Union
# See https://groups.google.com/forum/#!topic/python-ideas/gA1gdj3RZ5g
if sys.version_info >= (3,):
@@ -216,7 +216,7 @@ 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[_Text]] = ..., values: Optional[Values] = ...) -> Tuple[Values, List[_Text]]: ...
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: ...