from contextlib import AbstractContextManager
from io import TextIOWrapper
from typing import Any

WINDOWS: bool

def pty_size() -> tuple[int, int]: ...
def stdin_is_foregrounded_tty(stream: Any) -> bool: ...
def cbreak_already_set(stream: TextIOWrapper) -> bool: ...
def character_buffered(stream: TextIOWrapper) -> AbstractContextManager[None]: ...
def ready_for_reading(input_: TextIOWrapper) -> bool: ...
def bytes_to_read(input_: TextIOWrapper) -> int: ...
