Remove raise statements from function bodies (#3355)

While it may eventually be useful to mark the exceptions that can be
raised from a function or method, the semantics are currently undefined
and unclear.
This commit is contained in:
Sebastian Rittau
2019-10-13 21:51:43 +02:00
committed by GitHub
parent 2bd1b75641
commit de26a3d109
17 changed files with 77 additions and 199 deletions

View File

@@ -113,10 +113,8 @@ def fchmod(fd: int, mode: int) -> None: ...
def fchown(fd: int, uid: int, gid: int) -> None: ...
def fdatasync(fd: int) -> None: ...
def fdopen(fd: int, mode: str = ..., bufsize: int = ...) -> IO[str]: ...
def fork() -> int:
raise OSError()
def forkpty() -> Tuple[int, int]:
raise OSError()
def fork() -> int: ...
def forkpty() -> Tuple[int, int]: ...
def fpathconf(fd: int, name: str) -> None: ...
def fstat(fd: int) -> stat_result: ...
def fstatvfs(fd: int) -> statvfs_result: ...
@@ -128,8 +126,7 @@ def getegid() -> int: ...
def geteuid() -> int: ...
def getgid() -> int: ...
def getgroups() -> List[int]: ...
def getloadavg() -> Tuple[float, float, float]:
raise OSError()
def getloadavg() -> Tuple[float, float, float]: ...
def getlogin() -> str: ...
def getpgid(pid: int) -> int: ...
def getpgrp() -> int: ...
@@ -195,12 +192,10 @@ def uname() -> Tuple[str, str, str, str, str]: ...
def unlink(path: unicode) -> None: ...
def unsetenv(varname: str) -> None: ...
def urandom(n: int) -> str: ...
def utime(path: unicode, times: Optional[Tuple[int, int]]) -> None:
raise OSError
def utime(path: unicode, times: Optional[Tuple[int, int]]) -> None: ...
def wait() -> int: ...
_r = Tuple[float, float, int, int, int, int, int, int, int, int, int, int, int, int, int, int]
def wait3(options: int) -> Tuple[int, int, _r]: ...
def wait4(pid: int, options: int) -> Tuple[int, int, _r]: ...
def waitpid(pid: int, options: int) -> int:
raise OSError()
def waitpid(pid: int, options: int) -> int: ...
def write(fd: int, str: str) -> int: ...