from typing import Any, ContextManager, Optional, TextIO, Union

from .ansitowin32 import StreamWrapper

orig_stdout: Optional[TextIO]
orig_stderr: Optional[TextIO]
wrapped_stdout: Union[TextIO, StreamWrapper]
wrapped_stderr: Union[TextIO, StreamWrapper]
atexit_done: bool

def reset_all() -> None: ...
def init(autoreset: bool = ..., convert: Optional[bool] = ..., strip: Optional[bool] = ..., wrap: bool = ...) -> None: ...
def deinit() -> None: ...
def colorama_text(*args: Any, **kwargs: Any) -> ContextManager[None]: ...
def reinit() -> None: ...
def wrap_stream(
    stream: TextIO, convert: Optional[bool], strip: Optional[bool], autoreset: bool, wrap: bool
) -> Union[TextIO, StreamWrapper]: ...
