Merge pull request #339 from tharvik/improve_os

add some types to os
This commit is contained in:
Matthias Kramm
2016-07-11 06:18:38 -07:00
committed by GitHub

View File

@@ -124,7 +124,8 @@ class stat_result:
st_ctime = 0.0 # platform dependent (time of most recent metadata change
# on Unix, or the time of creation on Windows)
def __init__(self, tuple) -> None: ...
# not documented
def __init__(self, tuple: Tuple[int, ...]) -> None: ...
# On some Unix systems (such as Linux), the following attributes may also
# be available:
@@ -158,7 +159,7 @@ class statvfs_result: # Unix only
# ----- os function stubs -----
def fsencode(filename: str) -> bytes: ...
def fsdecode(filename: bytes) -> str: ...
def get_exec_path(env=...) -> List[str] : ...
def get_exec_path(env: Optional[Dict[str, str]] = ...) -> List[str] : ...
# NOTE: get_exec_path(): returns List[bytes] when env not None
def ctermid() -> str: ... # Unix only
def getegid() -> int: ... # Unix only
@@ -190,7 +191,7 @@ def setresuid(ruid: int, euid: int, suid: int) -> None: ... # Unix only
def setreuid(ruid: int, euid: int) -> None: ... # Unix only
def getsid(pid: int) -> int: ... # Unix only
def setsid() -> int: ... # Unix only
def setuid(uid) -> None: ... # Unix only
def setuid(uid: int) -> None: ... # Unix only
def strerror(code: int) -> str: ...
def umask(mask: int) -> int: ...
def uname() -> Tuple[str, str, str, str, str]: ... # Unix only
@@ -203,7 +204,7 @@ def closerange(fd_low: int, fd_high: int) -> None: ...
def device_encoding(fd: int) -> Optional[str]: ...
def dup(fd: int) -> int: ...
def dup2(fd: int, fd2: int) -> None: ...
def fchmod(fd: int, intmode) -> None: ... # Unix only
def fchmod(fd: int, mode: int) -> None: ... # Unix only
def fchown(fd: int, uid: int, gid: int) -> None: ... # Unix only
def fdatasync(fd: int) -> None: ... # Unix only, not Mac
def fpathconf(fd: int, name: str) -> int: ... # Unix only
@@ -241,7 +242,7 @@ def listdir(path: str = ...) -> List[str]: ...
def listdir(path: bytes) -> List[bytes]: ...
def lstat(path: AnyStr) -> stat_result: ...
def mkfifo(path, mode: int=...) -> None: ... # Unix only
def mkfifo(path: str, mode: int = ...) -> None: ... # Unix only
def mknod(filename: AnyStr, mode: int = ..., device: int = ...) -> None: ...
def major(device: int) -> int: ...
def minor(device: int) -> int: ...