Skip to content

remove CodeGenerator.need_GUID #357

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 1 commit into from
Nov 2, 2022

Conversation

junkmd
Copy link
Collaborator

@junkmd junkmd commented Sep 29, 2022

The GUID symbol is defined statically in comtypes/__init__.py, so it is always existing in comtypes module namespace.

Therefore, if "GUID" in self.known_symbols: in CodeGenerator.need_GUID was always True. It was a redundant process.

So I have removed the need_GUID method and instead use self.imports.add("comtypes", "GUID") which is more concise and does the same thing.

This is a refactoring of the codegenerator before adding the stub generation process and is related to #327.

junkmd added a commit to junkmd/pywinauto that referenced this pull request Sep 29, 2022
junkmd added a commit to junkmd/pywinauto that referenced this pull request Sep 30, 2022
vasily-v-ryabov added a commit to vasily-v-ryabov/pywinauto that referenced this pull request Nov 1, 2022
@vasily-v-ryabov vasily-v-ryabov merged commit 49f25fb into enthought:master Nov 2, 2022
@junkmd junkmd deleted the remove_need_GUID branch November 2, 2022 15:13
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.

2 participants