diff --git a/stdlib/2.7/os/__init__.pyi b/stdlib/2.7/os/__init__.pyi index 55145c893..c68f48f27 100644 --- a/stdlib/2.7/os/__init__.pyi +++ b/stdlib/2.7/os/__init__.pyi @@ -1,7 +1,8 @@ # created from https://docs.python.org/2/library/os.html from typing import ( - List, Tuple, Union, Sequence, Mapping, IO, Any, Optional, AnyStr, Iterator, MutableMapping + List, Tuple, Union, Sequence, Mapping, IO, Any, Optional, AnyStr, Iterator, + MutableMapping, NamedTuple ) import os.path as path @@ -76,7 +77,6 @@ def fpathconf(fd: int, name: str) -> None: ... # TODO(prvak) def fstat(fd: int) -> Any: ... -def fstatvfs(fd: int) -> Any: ... def fsync(fd: int) -> None: ... def ftruncate(fd: int, length: int) -> None: ... def isatty(fd: int) -> bool: ... @@ -140,7 +140,15 @@ def rmdir(path: unicode) -> None: ... # TODO(MichalPokorny) def stat(path: unicode) -> Any: ... -# TODO: stat_float_times, statvfs, tempnam, tmpnam, TMP_MAX +_StatVFS = NamedTuple('_StatVFS', [('f_bsize', int), ('f_frsize', int), ('f_blocks', int), + ('f_bfree', int), ('f_bavail', int), ('f_files', int), + ('f_ffree', int), ('f_favail', int), ('f_flag', int), + ('f_namemax', int)]) + +def fstatvfs(fd: int) -> _StatVFS: ... +def statvfs(path: unicode) -> _StatVFS: ... + +# TODO: stat_float_times, tempnam, tmpnam, TMP_MAX def walk(top: AnyStr, topdown: bool = ..., onerror: Any = ..., followlinks: bool = ...) -> Iterator[Tuple[AnyStr, List[AnyStr], List[AnyStr]]]: ...