-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this 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: ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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: ... |
There was a problem hiding this comment.
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。
There was a problem hiding this comment.
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.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this 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.
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
fix #14440.