diff --git a/stubs/colorama/@tests/stubtest_allowlist.txt b/stubs/colorama/@tests/stubtest_allowlist.txt index 1cf6b94b0..e6c8d6cd4 100644 --- a/stubs/colorama/@tests/stubtest_allowlist.txt +++ b/stubs/colorama/@tests/stubtest_allowlist.txt @@ -45,8 +45,12 @@ colorama.initialise.wrapped_stdout # These are re-exports that are implementation detail: colorama.ansitowin32.BEL colorama.ansitowin32.windll +colorama.winterm.get_osfhandle # These are only available on Windows: colorama.winterm.WinColor colorama.winterm.WinStyle colorama.winterm.WinTerm + +# Not planning on writing stubs for tests: +colorama.tests.* diff --git a/stubs/colorama/colorama/ansitowin32.pyi b/stubs/colorama/colorama/ansitowin32.pyi index 19a854c05..f406f2e20 100644 --- a/stubs/colorama/colorama/ansitowin32.pyi +++ b/stubs/colorama/colorama/ansitowin32.pyi @@ -49,3 +49,4 @@ class AnsiToWin32: def extract_params(self, command: str, paramstring: str) -> tuple[int, ...]: ... def call_win32(self, command: str, params: Sequence[int]) -> None: ... def convert_osc(self, text: str) -> str: ... + def flush(self) -> None: ... diff --git a/stubs/colorama/colorama/initialise.pyi b/stubs/colorama/colorama/initialise.pyi index f0c12f2de..b607956ca 100644 --- a/stubs/colorama/colorama/initialise.pyi +++ b/stubs/colorama/colorama/initialise.pyi @@ -8,6 +8,7 @@ orig_stderr: TextIO | None wrapped_stdout: TextIO | StreamWrapper wrapped_stderr: TextIO | StreamWrapper atexit_done: bool +fixed_windows_console: bool def reset_all() -> None: ... def init(autoreset: bool = ..., convert: bool | None = ..., strip: bool | None = ..., wrap: bool = ...) -> None: ... @@ -17,3 +18,4 @@ def reinit() -> None: ... def wrap_stream( stream: TextIO, convert: bool | None, strip: bool | None, autoreset: bool, wrap: bool ) -> TextIO | StreamWrapper: ... +def just_fix_windows_console() -> None: ... diff --git a/stubs/colorama/colorama/win32.pyi b/stubs/colorama/colorama/win32.pyi index 713aaf273..59d1601e5 100644 --- a/stubs/colorama/colorama/win32.pyi +++ b/stubs/colorama/colorama/win32.pyi @@ -4,6 +4,7 @@ from typing_extensions import Literal STDOUT: Literal[-11] STDERR: Literal[-12] +ENABLE_VIRTUAL_TERMINAL_PROCESSING: int if sys.platform == "win32": from ctypes import LibraryLoader, Structure, WinDLL, wintypes diff --git a/stubs/colorama/colorama/winterm.pyi b/stubs/colorama/colorama/winterm.pyi index af1dd3db1..7740ad780 100644 --- a/stubs/colorama/colorama/winterm.pyi +++ b/stubs/colorama/colorama/winterm.pyi @@ -34,3 +34,5 @@ if sys.platform == "win32": def erase_screen(self, mode: int = ..., on_stderr: bool = ...) -> None: ... def erase_line(self, mode: int = ..., on_stderr: bool = ...) -> None: ... def set_title(self, title: str) -> None: ... + +def enable_vt_processing(fd: int) -> bool: ...