colorama: fixes for latest version (#8987)

Fixes #8986
This commit is contained in:
Shantanu
2022-10-25 17:57:01 -07:00
committed by GitHub
parent b2d6d3c935
commit 7ba0479d75
5 changed files with 10 additions and 0 deletions

View File

@@ -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.*

View File

@@ -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: ...

View File

@@ -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: ...

View File

@@ -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

View File

@@ -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: ...