diff --git a/stubs/colorama/colorama/initialise.pyi b/stubs/colorama/colorama/initialise.pyi index b607956ca..25107f16a 100644 --- a/stubs/colorama/colorama/initialise.pyi +++ b/stubs/colorama/colorama/initialise.pyi @@ -1,8 +1,10 @@ from contextlib import AbstractContextManager -from typing import Any, TextIO +from typing import Any, TextIO, TypeVar from .ansitowin32 import StreamWrapper +_TextIOT = TypeVar("_TextIOT", bound=TextIO) + orig_stdout: TextIO | None orig_stderr: TextIO | None wrapped_stdout: TextIO | StreamWrapper @@ -16,6 +18,6 @@ def deinit() -> None: ... def colorama_text(*args: Any, **kwargs: Any) -> AbstractContextManager[None]: ... def reinit() -> None: ... def wrap_stream( - stream: TextIO, convert: bool | None, strip: bool | None, autoreset: bool, wrap: bool -) -> TextIO | StreamWrapper: ... + stream: _TextIOT, convert: bool | None, strip: bool | None, autoreset: bool, wrap: bool +) -> _TextIOT | StreamWrapper: ... def just_fix_windows_console() -> None: ...