From 1833e8e4b6ce6562e7d0c1777345616babf1fb6e Mon Sep 17 00:00:00 2001 From: tharvik Date: Mon, 11 Jul 2016 15:09:52 +0200 Subject: [PATCH] add some types to os --- stdlib/3/os/__init__.pyi | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/stdlib/3/os/__init__.pyi b/stdlib/3/os/__init__.pyi index d26e19f8f..142961e7a 100644 --- a/stdlib/3/os/__init__.pyi +++ b/stdlib/3/os/__init__.pyi @@ -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: ...