Fixes to shutil stub in Python 3 (#1227)

Mostly PathLike support; also added the os.terminal_size namedtuple.
This commit is contained in:
Jelle Zijlstra
2017-05-01 08:30:41 -07:00
committed by Guido van Rossum
parent 238c869965
commit 464761bfd3
2 changed files with 51 additions and 35 deletions

View File

@@ -428,7 +428,8 @@ if sys.version_info >= (3, 3):
dir_fd: int = ...) -> Iterator[Tuple[AnyStr, List[AnyStr],
List[AnyStr], int]]: ... # Unix only
def get_terminal_size(fd: int = ...) -> Tuple[int, int]: ...
terminal_size = NamedTuple('terminal_size', [('columns', int), ('lines', int)])
def get_terminal_size(fd: int = ...) -> terminal_size: ...
if sys.version_info >= (3, 4):
def cpu_count() -> Optional[int]: ...