diff --git a/stdlib/2and3/optparse.pyi b/stdlib/2and3/optparse.pyi index 8ffd75b81..27dd5c6cb 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 IO, Any, AnyStr, Callable, Dict, Iterable, List, Mapping, Optional, Sequence, Tuple, Union, overload +from typing import IO, Any, AnyStr, Callable, Dict, Iterable, List, Mapping, Optional, Sequence, Tuple, Type, Union, overload # See https://groups.google.com/forum/#!topic/python-ideas/gA1gdj3RZ5g if sys.version_info >= (3,): @@ -125,8 +125,8 @@ class OptionContainer: conflict_handler: _Text defaults: Dict[_Text, Any] description: Any - option_class: Any - def __init__(self, option_class: Option, conflict_handler: Any, description: Any) -> None: ... + option_class: Type[Option] + def __init__(self, option_class: Type[Option], conflict_handler: Any, description: Any) -> None: ... def _check_conflict(self, option: Any) -> None: ... def _create_option_mappings(self) -> None: ... def _share_option_mappings(self, parser: OptionParser) -> None: ... @@ -183,7 +183,7 @@ class OptionParser(OptionContainer): self, usage: Optional[_Text] = ..., option_list: Iterable[Option] = ..., - option_class: Option = ..., + option_class: Type[Option] = ..., version: Optional[_Text] = ..., conflict_handler: _Text = ..., description: Optional[_Text] = ...,