Skip to content

Commit

Permalink
optparse: option_class is Type[Option] (python#4338)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmhahn authored Jul 17, 2020
1 parent ee77a35 commit e44ac21
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions stdlib/2and3/optparse.pyi
Original file line number Diff line number Diff line change
@@ -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,):
Expand Down Expand Up @@ -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: ...
Expand Down Expand Up @@ -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] = ...,
Expand Down

0 comments on commit e44ac21

Please sign in to comment.