8000 Run stubtest on windows for colorama by Avasam · Pull Request #9168 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

Run stubtest on windows for colorama #9168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions stubs/colorama/@tests/stubtest_allowlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,6 @@ 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.*
8 changes: 8 additions & 0 deletions stubs/colorama/@tests/stubtest_allowlist_linux.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# These are only available on Windows:
colorama.winterm.WinColor
colorama.winterm.WinStyle
colorama.winterm.WinTerm

# These are re-exports that are implementation detail:
colorama.ansitowin32.windll
colorama.winterm.get_osfhandle
1 change: 1 addition & 0 deletions stubs/colorama/METADATA.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ version = "0.4.*"

[tool.stubtest]
ignore_missing_stub = false
platforms = ["win32", "linux"]
2 changes: 2 additions & 0 deletions stubs/colorama/colorama/win32.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ if sys.platform == "win32":
def FillConsoleOutputCharacter(stream_id: int, char: str, length: int, start: COORD) -> int: ...
def FillConsoleOutputAttribute(stream_id: int, attr: int, length: int, start: COORD) -> wintypes.BOOL: ...
def SetConsoleTitle(title: str) -> wintypes.BOOL: ...
def GetConsoleMode(handle: int) -> int: ...
def SetConsoleMode(handle: int, mode: int) -> None: ...
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you temporarily delete these methods and then add them back? I would like to make sure that the CI fails when these are missing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There you go, fails on windows now :)


else:
windll: None
Expand Down
0