diff --git a/stdlib/2.7/getopt.pyi b/stdlib/2.7/getopt.pyi new file mode 100644 index 000000000..0a8fa0cc2 --- /dev/null +++ b/stdlib/2.7/getopt.pyi @@ -0,0 +1,17 @@ +from typing import List, Tuple + +class GetoptError(Exception): + opt = ... # type: str + msg = ... # type: str + def __init__(self, msg: str, opt: str=...) -> None: ... + def __str__(self) -> str: ... + +error = GetoptError + +def getopt(args: List[str], shortopts: str, + longopts: List[str]=...) -> Tuple[List[Tuple[str, str]], + List[str]]: ... + +def gnu_getopt(args: List[str], shortopts: str, + longopts: List[str]=...) -> Tuple[List[Tuple[str,str]], + List[str]]: ... diff --git a/stdlib/3/getopt.pyi b/stdlib/3/getopt.pyi index 169c4e1d5..dc75699bc 100644 --- a/stdlib/3/getopt.pyi +++ b/stdlib/3/getopt.pyi @@ -5,12 +5,12 @@ from typing import List, Tuple def getopt(args: List[str], shortopts: str, - longopts: List[str]) -> Tuple[List[Tuple[str, str]], - List[str]]: ... + longopts: List[str]=...) -> Tuple[List[Tuple[str, str]], + List[str]]: ... def gnu_getopt(args: List[str], shortopts: str, - longopts: List[str]) -> Tuple[List[Tuple[str, str]], - List[str]]: ... + longopts: List[str]=...) -> Tuple[List[Tuple[str, str]], + List[str]]: ... class GetoptError(Exception): msg = ... # type: str