From 9fda6b20ec917b6af09a1393a96126426993adaf Mon Sep 17 00:00:00 2001 From: Rebecca Chen Date: Tue, 25 Sep 2018 21:15:10 -0700 Subject: [PATCH] Make the signature of optparse.OptionParser.parse_args more precise. (#2464) --- stdlib/2and3/optparse.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/2and3/optparse.pyi b/stdlib/2and3/optparse.pyi index 52ca10428..a03f5dc03 100644 --- a/stdlib/2and3/optparse.pyi +++ b/stdlib/2and3/optparse.pyi @@ -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: ...