pywin32: Complete modules using stubgen & stubtest#8866
Merged
AlexWaygood merged 1 commit intopython:masterfrom Oct 7, 2022
Merged
pywin32: Complete modules using stubgen & stubtest#8866AlexWaygood merged 1 commit intopython:masterfrom
AlexWaygood merged 1 commit intopython:masterfrom
Conversation
AlexWaygood
approved these changes
Oct 7, 2022
Member
AlexWaygood
left a comment
There was a problem hiding this comment.
Haven't reviewed in depth (cos 13,500 lines), but skimmed through -- nothing stands out as obviously incorrect. If there are any issues with specific parts, they can be fixed in followup PRs.
Thanks!
Contributor
|
Diff from mypy_primer, showing the effect of this PR on open source code: apprise (https://github.com/caronc/apprise)
- apprise/plugins/NotifyWindows.py:42: error: Cannot find implementation or library stub for module named "win32api"
- apprise/plugins/NotifyWindows.py:43: error: Cannot find implementation or library stub for module named "win32con"
- apprise/plugins/NotifyWindows.py:44: error: Cannot find implementation or library stub for module named "win32gui"
comtypes (https://github.com/enthought/comtypes)
- comtypes/test/test_win32com_interop.py:14: error: Cannot find implementation or library stub for module named "win32com.client"
- comtypes/test/test_win32com_interop.py:14: error: Cannot find implementation or library stub for module named "win32com"
- comtypes/test/test_dispinterface.py:47: error: Cannot find implementation or library stub for module named "win32com.client.dynamic"
- comtypes/test/test_comserver.py:100: error: Cannot find implementation or library stub for module named "win32com.client"
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the followup to #8825. It does 3 main things:
import win32conandimport win32comrather thanimport win32.lib.win32conandimport win32comext.). Though both are valid imports.Some modules could not be fully generated with stubgen because of python/mypy#13822 . Some couldn't because
win32uineeds to be imported first.We can't run stubtest on the CI anyway because of #8660, but if we could, the same mypy issue would result in an error (I had to comment out the imports and delete the modules while testing locally)
* Is there a cleaner way to do this in stubs environment than adding a bunch of top-level modules? Which will result in a ton of
*-stubspackage when installed from PyPI?