massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stdlib / distutils / fancy_getopt.pyi
1 from typing import Any, Iterable, List, Mapping, Optional, Tuple, overload
2
3 _Option = Tuple[str, Optional[str], str]
4 _GR = Tuple[List[str], OptionDummy]
5
6 def fancy_getopt(
7     options: list[_Option], negative_opt: Mapping[_Option, _Option], object: Any, args: list[str] | None
8 ) -> list[str] | _GR: ...
9 def wrap_text(text: str, width: int) -> list[str]: ...
10
11 class FancyGetopt:
12     def __init__(self, option_table: list[_Option] | None = ...) -> None: ...
13     # TODO kinda wrong, `getopt(object=object())` is invalid
14     @overload
15     def getopt(self, args: list[str] | None = ...) -> _GR: ...
16     @overload
17     def getopt(self, args: list[str] | None, object: Any) -> list[str]: ...
18     def get_option_order(self) -> list[tuple[str, str]]: ...
19     def generate_help(self, header: str | None = ...) -> list[str]: ...
20
21 class OptionDummy:
22     def __init__(self, options: Iterable[str] = ...) -> None: ...