Skip to content

Type stub for win32com.server #14492

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 8 commits into from
Jul 30, 2025
Merged

Type stub for win32com.server #14492

merged 8 commits into from
Jul 30, 2025

Conversation

qwertycxz
Copy link
Contributor

fix #14440.

This comment has been minimized.

Copy link
Member

@brianschubert brianschubert left a comment

Choose a reason for hiding this comment

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

Nice, left some comments below

def _set_string(path: str | None, value: str, base: PyHKEY | int = HKEY_CLASSES_ROOT) -> None: ...
def _get_string(path: str | None, base: PyHKEY | int = HKEY_CLASSES_ROOT) -> str | None: ...
def _remove_key(path: str | None, base: PyHKEY | int = HKEY_CLASSES_ROOT) -> None: ...
def recurse_delete_key(path: str | None, base: PyHKEY | int = HKEY_CLASSES_ROOT) -> None: ...
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
def recurse_delete_key(path: str | None, base: PyHKEY | int = HKEY_CLASSES_ROOT) -> None: ...
def recurse_delete_key(path: str | None, base: PyHKEY | int = -2147483648) -> None: ...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Although, I'm wondering, is it really good to replace HKEY_CLASSES_ROOT? This constant seems to be better understood。

Copy link
Collaborator

@Avasam Avasam Jul 30, 2025

Choose a reason for hiding this comment

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

Whilst I can agree it can look more readable at a glance, https://github.com/PyCQA/flake8-pyi/blob/main/ERRORCODES.md#Y011 isn't aware of a symbol being typed as Literal

Due to a limitation in how Ruff and Flake8 work, it couldn't unless it's defined in the same file, or we assume from the variable name. This may be solvable once a lot of work in Astral's ty comes back to Ruff.

In the mean time, it would cause a lot of noqa being needed.
And having a literal number is already better than the ellipsis = ... we used to have everywhere.

This comment has been minimized.

This comment has been minimized.

Copy link
Collaborator

@Avasam Avasam left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! Just a small improvement making CATID_PythonCOMServer final, otherwise good to go.
Great review from Brian.

Copy link
Contributor

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

@Avasam Avasam merged commit 5265263 into python:main Jul 30, 2025
48 checks passed
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.

win32com.server.register is missing?
3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy