os.get_terminal_size also exists on Windows (#2338)

... at least according to https://docs.python.org/3/library/os.html#os.get_terminal_size.

Related to python/mypy#5370.
This commit is contained in:
Jelle Zijlstra
2018-07-18 10:25:12 -07:00
committed by GitHub
parent 42db5ad4f7
commit 574807d9ea

View File

@@ -362,8 +362,8 @@ if sys.platform != 'win32':
def readv(fd: int, buffers: Sequence[bytearray]) -> int: ...
def writev(fd: int, buffers: Sequence[bytes]) -> int: ...
terminal_size = NamedTuple('terminal_size', [('columns', int), ('lines', int)])
def get_terminal_size(fd: int = ...) -> terminal_size: ...
terminal_size = NamedTuple('terminal_size', [('columns', int), ('lines', int)])
def get_terminal_size(fd: int = ...) -> terminal_size: ...
if sys.version_info >= (3, 4):
def get_inheritable(fd: int) -> bool: ...