Skip to content
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

Refactored itf.__dict__ to vars(itf) #641

Merged
merged 1 commit into from
Oct 14, 2024
Merged

Conversation

newwingbird
Copy link
Contributor

Proposal

Related to #472

I chose to use vars function because dunder/magic methods serve as the implementation, while invoking functions/methods acts as the API.

note

https://stackoverflow.com/questions/21297203/use-dict-or-vars

@newwingbird newwingbird changed the title Refactored itf.__dict__ tovars(itf) Refactored itf.__dict__ to vars(itf) Oct 14, 2024
@junkmd junkmd added this to the 1.4.8 milestone Oct 14, 2024
@junkmd junkmd added the typing related to Python static typing system label Oct 14, 2024
junkmd added a commit to junkmd/pywinauto that referenced this pull request Oct 14, 2024
Copy link
Collaborator

@junkmd junkmd left a comment

Choose a reason for hiding this comment

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

These lines used a complex way of catching exceptions to maintain compatibility between Python 2.x and Python 3.x.

Now, the same thing can be written without catching exceptions. Thanks to your efforts, the code has been modernized.

@junkmd junkmd merged commit 112cd26 into enthought:main Oct 14, 2024
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
typing related to Python static typing system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

prevent itf to be an unbound variable in _cominterface_meta.__get_baseinterface_methodcount
2 participants