8000 Run stubtest on windows for colorama (#9168) · python/typeshed@24277ce · GitHub
[go: up one dir, main page]

Skip to content

Commit 24277ce

Browse files
authored
Run stubtest on windows for colorama (#9168)
1 parent 02f2bc3 commit 24277ce

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

stubs/colorama/@tests/stubtest_allowlist.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,6 @@ colorama.initialise.wrapped_stdout
4444

4545
# These are re-exports that are implementation detail:
4646
colorama.ansitowin32.BEL
47-
colorama.ansitowin32.windll
48-
colorama.winterm.get_osfhandle
49-
50-
# These are only available on Windows:
51-
colorama.winterm.WinColor
52-
colorama.winterm.WinStyle
53-
colorama.winterm.WinTerm
5447

5548
# Not planning on writing stubs for tests:
5649
colorama.tests.*
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# These are only available on Windows:
2+
colorama.winterm.WinColor
3+
colorama.winterm.WinStyle
4+
colorama.winterm.WinTerm
5+
6+
# These are re-exports that are implementation detail:
7+
colorama.ansitowin32.windll
8+
colorama.winterm.get_osfhandle

stubs/colorama/METADATA.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ version = "0.4.*"
22

33
[tool.stubtest]
44
ignore_missing_stub = false
5+
platforms = ["win32", "linux"]

stubs/colorama/colorama/win32.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ if sys.platform == "win32":
2525
def FillConsoleOutputCharacter(stream_id: int, char: str, length: int, start: COORD) -> int: ...
2626
def FillConsoleOutputAttribute(stream_id: int, attr: int, length: int, start: COORD) -> wintypes.BOOL: ...
2727
def SetConsoleTitle(title: str) -> wintypes.BOOL: ...
28+
def GetConsoleMode(handle: int) -> int: ...
29+
def SetConsoleMode(handle: int, mode: int) -> None: ...
2830

2931
else:
3032
windll: None

0 commit comments

Comments
 (0)
0