Skip to content

[Pygments] Complete stubs for various modules#15610

Open
brianschubert wants to merge 2 commits intopython:mainfrom
brianschubert:stubs-pygments-complete-misc
Open

[Pygments] Complete stubs for various modules#15610
brianschubert wants to merge 2 commits intopython:mainfrom
brianschubert:stubs-pygments-complete-misc

Conversation

@brianschubert
Copy link
Copy Markdown
Collaborator

No description provided.

Comment on lines +70 to +71
def combine(*args: _Cats) -> str: ...
def allexcept(*args: _Cats) -> str: ...
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

note: these are always called with literal values in practice (example), so I think using a literal type here provides some useful validation (even if a little verbose in the stubs)

Comment on lines +41 to +42
def guess_decode_from_terminal(text: bytes, term: TextIO) -> tuple[str, str]: ...
def terminal_encoding(term: TextIO) -> str: ...
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

didn't feel worth using a more precise protocol since term is always sys.stdin / a proper file object in practice

@github-actions

This comment has been minimized.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 5, 2026

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant