Skip to content

Improve pywin32.isapi #13889

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
Apr 28, 2025
Merged

Improve pywin32.isapi #13889

merged 8 commits into from
Apr 28, 2025

Conversation

donBarbos
Copy link
Contributor

No description provided.

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! That's a nice improvement. I have a few small comments.

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! That's a nice improvement. I have a few small comments.

Comment on lines +87 to +88
def InstallModule(conf_module_name: StrPath, params, options, log: Callable[[int, str], Unused] = ...) -> None: ...
def UninstallModule(conf_module_name: StrPath, params, options, log: Callable[[int, str], Unused] = ...) -> None: ...
Copy link
Contributor Author

@donBarbos donBarbos Apr 27, 2025

Choose a reason for hiding this comment

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

should it be sync with the log function?

Suggested change
def InstallModule(conf_module_name: StrPath, params, options, log: Callable[[int, str], Unused] = ...) -> None: ...
def UninstallModule(conf_module_name: StrPath, params, options, log: Callable[[int, str], Unused] = ...) -> None: ...
def InstallModule(conf_module_name: StrPath, params, options, log: Callable[[int, object], Unused] = ...) -> None: ...
def UninstallModule(conf_module_name: StrPath, params, options, log: Callable[[int, object], Unused] = ...) -> None: ...

Copy link
Collaborator

@Avasam Avasam Apr 27, 2025

Choose a reason for hiding this comment

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

Good catch. Yeah.

Copy link
Collaborator

@Avasam Avasam Apr 27, 2025

Choose a reason for hiding this comment

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

@donBarbos My bad. I answered too fast. Here it means "this function expects to be passed a log parameter that should be a function that accepts a str as the 2nd parameter".

In other words, we want to ensure that whatever function will be passed here will work once a string is passed. The typing here is based on usage, it's completely separate from isapi.isntall.log

I went ahead and reverted the last commit.

@donBarbos
Copy link
Contributor Author

thanks for helping get rid of Incomplete, I didn't touch the types that I didn't find confirmation for in the code

This comment has been minimized.

Copy link
Contributor

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

@srittau srittau merged commit 6759cb1 into python:main Apr 28, 2025
43 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.

3 participants