Added stdlib/2.7/getopt.pyi, updated 3/getopt.pyi (#221)

* Added stdlib/2.7/getopt.pyi

* Small fixes to stdlib/3/getopt.pyi
This commit is contained in:
Dakkaron
2016-05-25 16:14:42 +02:00
committed by Guido van Rossum
parent b98580d299
commit f32e26ebc2
2 changed files with 21 additions and 4 deletions

17
stdlib/2.7/getopt.pyi Normal file
View File

@@ -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]]: ...

View File

@@ -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