1# Stubs for distutils.fancy_getopt 2 3from typing import ( 4 Any, List, Mapping, Optional, Tuple, Union, 5 TypeVar, overload, 6) 7 8_Option = Tuple[str, Optional[str], str] 9_GR = Tuple[List[str], OptionDummy] 10 11def fancy_getopt(options: List[_Option], 12 negative_opt: Mapping[_Option, _Option], 13 object: Any, 14 args: Optional[List[str]]) -> Union[List[str], _GR]: ... 15def wrap_text(text: str, width: int) -> List[str]: ... 16 17class FancyGetopt: 18 def __init__(self, option_table: Optional[List[_Option]] = ...) -> None: ... 19 # TODO kinda wrong, `getopt(object=object())` is invalid 20 @overload 21 def getopt(self, args: Optional[List[str]] = ...) -> _GR: ... 22 @overload 23 def getopt(self, args: Optional[List[str]], object: Any) -> List[str]: ... 24 def get_option_order(self) -> List[Tuple[str, str]]: ... 25 def generate_help(self, header: Optional[str] = ...) -> List[str]: ... 26 27class OptionDummy: ... 28